#include<conio.h>
main()
{
int x,y=2,z,a;
if(x=y%2) z=2;
a=2;
printf("%d %d ",z,x);
}
Answer / susie
Answer :
Garbage-value 0
Explanation:
The value of y%2 is 0. This value is assigned to x. The
condition reduces to if (x) or in other words if(0) and so z
goes uninitialized.
Thumb Rule: Check all control paths to write bug free
code.
| Is This Answer Correct ? | 5 Yes | 1 No |
#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??
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513
3 Answers HCL, Logical Computers,
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
16 Answers Aricent, Cisco, Directi, Qualcomm,
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
Is it possible to print a name without using commas, double quotes,semi-colons?
main() { extern int i; i=20; printf("%d",i); }
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);
Write a program to print a square of size 5 by using the character S.
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']