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

Is it possible to type a name in command line without ant quotes?

1 Answers   Excel, Infosys,


Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }

1 Answers  


#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); }

1 Answers   TCS,


#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

1 Answers  


respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"

1 Answers   Genpact, Ozdocs,






main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


How will u find whether a linked list has a loop or not?

8 Answers   Microsoft,


How we print the table of 3 using for loop in c programing?

7 Answers  


There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

1 Answers   TCS,


struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main() { struct aaa abc,def,ghi,jkl; int x=100; abc.i=0;abc.prev=&jkl; abc.next=&def; def.i=1;def.prev=&abc;def.next=&ghi; ghi.i=2;ghi.prev=&def; ghi.next=&jkl; jkl.i=3;jkl.prev=&ghi;jkl.next=&abc; x=abc.next->next->prev->next->i; printf("%d",x); }

1 Answers  


How to palindrom string in c language?

6 Answers   Google,


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

0 Answers   TCS,


Categories