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 the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 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,


#include<stdio.h> int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??

1 Answers  


main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }

1 Answers  


Display the time of the system and display the right time of the other country

1 Answers  






main() { printf("\nab"); printf("\bsi"); printf("\rha"); }

3 Answers  


Give a oneline C expression to test whether a number is a power of 2?

25 Answers   EA Electronic Arts, Google, Motorola,


#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }

1 Answers  


main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

4 Answers   HCL,


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

0 Answers   Mbarara University of Science and Technology,


Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)

7 Answers   Microsoft,


main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }

1 Answers  


Categories