Showing posts with label sizeof. Show all posts
Showing posts with label sizeof. Show all posts
Monday, February 9, 2009
What is sizeof('A') ?
The same as sizeof(int). Character constants have type int in C. (This is one area in which C++ differs.)
Thursday, January 8, 2009
Find the correct output
void main()
{
int a[]={‘a’,’b’,’c’};
printf(“%d”, sizeof(a));
}
(a) 3
(b) 4
(c) can’t be initialized
(d) None of these
{
int a[]={‘a’,’b’,’c’};
printf(“%d”, sizeof(a));
}
(a) 3
(b) 4
(c) can’t be initialized
(d) None of these
Monday, December 1, 2008
According to the Standard C specification, what are the respective minimum ranges (in bytes) of the following three data types: short, int, long?
Choice a: 1, 2, 2
Choice b: 2, 4, 8
Choice c: 2, 2, 4
Choice d: 2, 4, 4
Choice e: 1, 2, 8
Choice b: 2, 4, 8
Choice c: 2, 2, 4
Choice d: 2, 4, 4
Choice e: 1, 2, 8
Subscribe to:
Posts (Atom)