number of iterations in the following loop

main()
{ int x=5, y=10, z=9
   for (;x<=5;)
      {y++;z--;
        x=x+1/2;
        if(z==0) z=y;}}

Edited 6 Years Ago by Nick Evan: Added code-tags...

What will be the output of the following code segment (assuming sizeof (int) returns 4)

int i= 0x1<<sizeof (int)*8-1;
printf("\n%x", i);
i=i>>sizeof(int)*8-1;
printf("%d",i);

Edited 6 Years Ago by WaltP: Added CODE Tags -- again

Which one is the valid statement in C?
A)#define half(x) ((x/2.0)
B)#define STREQ(s1,s2) (strcmp((s1),(s2))==0);
C)#define MAX=5
D)#define INTEREST 5, LOAD 5000

Choose the correct option to find maximum of the three interger variables.
A) (a>b)?((a>c)?a:c):((b>c)?b:c)
B)(a>b)?((b>c)?b:c):((a>c)?a:c)
C)(a>b)?((c>b)?a:c):((a>c)?a:c)
D) None

What is the effect of the following code?

main() 
{
int option=4;
  switch(option/2)
      {
       case 1: printf("EAST");
       case 2: printf("WEST");
       case 3: printf("NORTH");
       case 4: printf("SOUTH");
      }
  }

Edited 6 Years Ago by WaltP: And again...

Comments
Do your own damn homework!

What is the effect of the following code?
main()
{
int option=4;
switch(option/2)
{
case 1: printf("EAST");
case 2: printf("WEST");
case 3: printf("NORTH");
case 4: printf("SOUTH");
}
}

Hint: there are no break statements between the cases.

This question has already been answered. Start a new discussion instead.