main()

{

int i;

float *pf;

pf = (float *)&i;

*pf = 100.00;

printf("\n %d", i);

}

a. Runtime error.

b. 100

c. Some Integer not 100

d. None of the above

Answers were Sorted based on User's Feedback



main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf(&qu..

Answer / pavan mustyala

d) Some junk number because floating value is stored in
integer via pointer pf.

Is This Answer Correct ?    15 Yes 1 No

main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf(&qu..

Answer / guest

d) 0

Is This Answer Correct ?    8 Yes 2 No

Post New Answer

More C Code Interview Questions

main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }

2 Answers   IBM,


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

0 Answers  


main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123

1 Answers   HCL,


Derive expression for converting RGB color parameters to HSV values

1 Answers  


String copy logic in one line.

11 Answers   Microsoft, NetApp,


How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)

4 Answers   HCL,


Program to Delete an element from a doubly linked list.

4 Answers   College School Exams Tests, Infosys,


void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }

1 Answers  


Link list in reverse order.

8 Answers   NetApp,


main() { int c=- -2; printf("c=%d",c); }

1 Answers   TCS,


#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

1 Answers  


Categories