Classical

C Programming MCQ - Constant Variables & Data Types

21:   The C declaration
int b [100];
reserves ____________ successive memory locations,each large enough to contain single integer.
A. 200
B. 10,000
C. 100
D. 10
 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



22:   What is the output of the following 'C' program?
main
{
extern int i;
i = 20;
print("%d",size of (i));
}
A. 2
B. 8
C. Would vary compiler to cimpiler
D. Error
 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:


main
{
extern int i;
i = 20;
print("%d",size of (i));
}'>
23:   What is the output of the following 'C' program?
main()
{
extern int a;
printf("\n%d",a);
}
int a=20;
A. Undefined
B. 20
C. Error
D. Garbage Value
 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:


main()
{
extern int a;
printf("\n%d",a);
}
int a=20;
'>
24:   The value of an automatic variable that is declared but not initialized will be
A. 0
B. Null
C. Garbage
D. None of these
 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



25:   Choose the correct answer


A. Enum variables can not be assigned new values
B. Enum variables can be compared
C. Enumeration feature increase the power of C
D. All of above
 
 

Option: C

Explanation :
The enumerated data types give an opportunity to invent our own data type and define what value the variable of this data type can take.

Click on Discuss to view users comments.

Write your comments here:





Suggest an improvement