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 the printf() statement you just made in number 1 above? Insert the following C statement into the code above. Fully explain why the output is that way: printf(“%%.10d : %.10d.\n”,sampleInt); 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);

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 4MQ2
icon
Related questions
Question

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>
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;
}
Transcribed Image Text:#include<stdio.h> 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; }
Expert Solution
steps

Step by step

Solved in 6 steps with 2 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT