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
d) Some junk number because floating value is stored in
integer via pointer pf.
| Is This Answer Correct ? | 15 Yes | 1 No |
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
How can i find first 5 natural Numbers without using any loop in c language????????
Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include <stdio.h> #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
can u give me the c codings for converting a string into the hexa decimal form......
#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
Write a C function to search a number in the given list of numbers. donot use printf and scanf
write a c-program to display the time using FOR loop