Answer the following questions: What is the C statement to print sampleFloat using a field width of 10 and a precision of 4 using fixed point notation? What is the printout when you run and compile...


Answer the following questions:



  1. What is the C statement to print
    sampleFloat
    using a field width of 10 and a precision of 4 using fixed point notation?

  2. What is the printout when you run and compile the printf() statement you just made in number 1 above?

  3. Insert the following C statement into the code above. Fully explain why the output is that way:



printf(“%%.10d : %.10d.\n”,sampleInt);



  1. Insert the following C statement into the code above. Fully explain why the output does not print the entire string.



printf(“%%.3s : %.3s.\n”,sampleChar);


#include<stdio.h><br>int main ()<br>{<br>float sampleFloat<br>1234567.7654321;<br>int<br>sampleInt<br>1234567;<br>char sampleChar []<br>

Extracted text: #include int main () { float sampleFloat 1234567.7654321; int sampleInt 1234567; char sampleChar [] "Is it too late now to say sorry?"; /* insert print outs here */ return 0; }

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here