NEW
Font size
WorksheetsC programming Chapter 4 Quiz
Total questions: 10
Worksheet time: 3hrs 30mins
int main ()
{
int x = 24, y = 39, z = 45;
printf ("%d %d %d", y, x, z);
}
24 39 45
39 24 45
45 39 24
39 45 24
Which is the only function all C programs must contain?
start()
system()
printf()
main()
Which of the following is not a correct variable type?
float
real
int
char
Which symbol terminates a C statement?
.
;
,
}
What function is use to display a message?
printf
output
What does \n do?
creates a tab
goes to a new line
sounds the computer's alarm.
prints a double quote mark
What does \t do?
creates a tab
prints a backslash
goes to a new line
sounds the computer's alarm
For the following float number 1.234500, what would be the output for %.3f in a printf statement?
1.234500
1.2345
1.23
123.4500
What type of variable does the %s conversion character stand for?
character
integer
floating point
string
What type of variable does the %d conversion character stand for?
string
integer
character
floating point
