Choose the correct statements
A. | enum is a data type. |
B. | enum feature is an alternative to the define feature |
C. | In the same enumeration values must be distinct |
D. | Both (a) and (b) |
Option: D Explanation : Click on Discuss to view users comments. |
Choose the correct statements
A. | enum variables can be assigned new values |
B. | enum variables can be compared |
C. | Enumeration feature does no increase the power of C |
D. | All of the above |
Option: D Explanation : Click on Discuss to view users comments. Pugal said: (1:29pm on Sunday 9th June 2013)
answer (d) is not correct
|
If a variable can take only integral values from 0 to n. where n is a constant integer, then the variable can be represented as a bit-field whose width is the integral part of (the log in the answers arc to the base 2)
A. | log (n) + 1 |
B. | log (n - 1) + 1 |
C. | log (n + 1) + 1 |
D. | none of the above |
Option: A Explanation :
Let n = 7. It needs actually a 3 bit-field. But log (n + 1) + 1 will be log (8 ) +1, i.e., 4, which is wrong. Click on Discuss to view users comments. |
In a C program constant is defined
A. | before main |
B. | after main |
C. | anywhere, but starting on a new line |
D. | none of the above |
Option: C Explanation : Click on Discuss to view users comments. swati said: (5:33pm on Monday 30th December 2013)
during declaration of a variable only we can define const variable
|