Question
#include
main()
{
int x,y=2,z,a;
if(x=y%2) z=2;
a=2;
printf("%d %d ",z,x);
}

Answers

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.   Your Comment






Search
Can you Answer!!
  • Q Explain issues for database performance?
  • Q Who is known as the father of tissue culture?
  • Q How many bones are present in human skull?
  • Q What is a country?
  • Q How to write comment in JavaScript?
  • Q In how many ways we can retrieve table records count?
  • Q What is your development process?
  • Q How do you go about identifying aspects of your organization, the organization's culture, and the offerings of the HR department that need to change or improve?
  • Q List out the tasks of universe designer?
  • Q Explain Ruby hashes.
  • Q How do you handle body language and gestures which are not understood by another person with a different cultural background?