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



main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / guest

a) 2

Is This Answer Correct ?    14 Yes 1 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / rakesh

ans will depend upon the compiler being used
if it c then it's (a)

Is This Answer Correct ?    9 Yes 3 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / sandeep

answer :


a> 2

becase sizeof method return the size of passed
arguments's data type

Is This Answer Correct ?    5 Yes 0 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / karthi

a.2

Is This Answer Correct ?    2 Yes 0 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

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

Post New Answer

More C Code Interview Questions

How to return multiple values from a function?

7 Answers  


main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }

2 Answers   Adobe, CSC,


main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 Answers  


main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }

2 Answers   CSS, Wipro,


void main() { int i=5; printf("%d",i++ + ++i); }

3 Answers  






main() { clrscr(); } clrscr();

2 Answers  


#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }

3 Answers  


How to read a directory in a C program?

4 Answers  


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

1 Answers   HCL,


main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above

2 Answers   HCL,


Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

21 Answers   ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,


programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h

1 Answers  


Categories