43. | Consider the following program fragment: int b = 1;
int fiddle(int c)
{
c *= 2; b = 0;
return 3;
}
main()
{ int a = 5, b = 7, c = 2;
c = fiddle(a);
/* HERE */
}
What are the values of a, b and c when execution reaches /* HERE */?
|
|||||||
|
44. | .If the binary eauivalent of 5.375 in normalised form is 0100 0000 1010 1100 0000 0000 0000 0000, what will be the output of the program (on intel machine)? #include
#include
int main()
{
float a=5.375;
char *p;
int i;
p = (char*)&a;
for(i=0; i<=3; i++)
printf("%02x\n", (unsigned char)p[i]);
return 0;
}
|
|||||||
|
45. | Which statement will you add in the following program to work it correctly? #include
int main()
{
printf("%f\n", log(36.0));
return 0;
}
|
|||||||
|
46. | What is the output of this C code? #include
printf("%.0f", 2.89);
|
|||||||
|
47. | What is the output of this C code? #include
int main()
{
float a = 2.455555555555;
printf("%f", a);
}
|
|||||||
|
48. | What will be output of following c code? #include
int main(){
int size;
size=sizeof(void);
printf("%d",size);
return 0;
}
|
|||||||
|
« previous
1
2
3
4
5
6
7
8