1.Which of the following declaration is not supported by C?
A. String str;
B. char *str;
C. float str = 3e2;
D. Both String str; & float str = 3e2;
2.Which of the following declaration is illegal?
A. char *str = “Best C programming classes by Sanfoundry”;
B. char str[] = “Best C programming classes by Sanfoundry”;
C. char str[20] = “Best C programming classes by Sanfoundry”;
D. char[] str = “Best C programming classes by Sanfoundry”;
3.Which keyword is used to prevent any changes in the variable within a C program?
A. immutable
B. mutable
C. const
D. volatile
4.Which of the following is not a pointer declaration?
A. char a[10];
B. char a[] = {‘1’, ‘2’, ‘3’, ‘4’};
C. char *str;
D. char a;
5.Which of the following statement is false?
A. A variable defined once can be defined again with different scope
B. A single variable cannot be defined with two different types in the same scope
C. A variable must be declared and defined at the same time
D. A variable refers to a location in memory
1.Which of the following declaration is not supported by C?
ans: A. String str;
2.Which of the following declaration is illegal?
ans: D. char[] str = “Best C programming classes by Sanfoundry”;
3.Which keyword is used to prevent any changes in the variable within a C program?
ans: C. const
4.Which of the following is not a pointer declaration?
ans: D. char a;
5.Which of the following statement is false?
ans: C. A variable must be declared and defined at the same time