programming in c quiz without answer
programming in c quiz without answer
a) volatile
b) true
c) friend
d) export
2. Which keyword is used to prevent any changes in the variable within a C program?
a) immutable
b) mutable
c) const
d) volatile
3. The C-preprocessors are specified with _________ symbol.
a) #
b) $
c) ” ”
d) &
4. In C language, FILE is of which data type?
a) int
b) char *
c) struct
d) None of the mentioned
1. #include <stdio.h>
2. void main()
3. {
4. int x = 5 * 9 / 3 + 9;
5. }
a) 3.75
b) Depends on compiler
c) 24
d) 3
n = 1;
printf("%d, %dn", 3*n, n++);
a) Output will be 3, 2
b) Output will be 3, 1
c) Output will be 6, 1
d) Output is compiler dependent
9. What will be the data type returned for the following C function?
1. #include <stdio.h>
2. int func()
3. {
4. return (double)(char)5.0;
5. }
a) char
b) int
c) double
d) multiple type-casting in return is illegal
string p = "HELLO";