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

write a program to count the number the same (letter/character foreg: 's') in a given sentence.

2 Answers  


What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }

1 Answers  


#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }

1 Answers  


main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }

1 Answers  


how to concatenate the two strings

1 Answers  






main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }

1 Answers  


write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"

2 Answers  


Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.

1 Answers   Samar State University,


main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 Answers  


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"

2 Answers  


How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.

1 Answers  


Categories