main()
{
int i = 100;
clrscr();
printf("%d", sizeof(sizeof(i)));
}
a. 2
b. 100
c. 4
d. none of the above
Answers were Sorted based on User's Feedback
Answer / kurt s
sizeof() is a compile-time operator, and it's implementation-specific. Depending on compiler and operating system, it is likely to be either (a) or (c). My desktop machine (Fedora core 13 , 32-bit) returns 4, but my old laptop running Win2000 returns 2.
| Is This Answer Correct ? | 0 Yes | 0 No |
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false
Write a procedure to implement highlight as a blinking operation
Is this code legal? int *ptr; ptr = (int *) 0x400;
how to delete an element in an array
why array index always strats wuth zero?
abcdedcba abc cba ab ba a a
How do you write a program which produces its own source code as its output?
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0