Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

C Programming :: Increment-Decrement

Home > C Programming > Increment-Decrement > General Questions

21. What will be output of the following "c" code?

#include
void main()
{
int i=5;
printf("%d",i=++i ==6);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

== is of higher precedence than = operator
The expression can be treated as i = (++i==6), because.
In the inner expression, ++i is equal to 6 yielding true.

Workspace

Tags:

No Tags on this question yet!

22. What will be output of the following "c" code?

#include
void main()
{
int i=300;
char *ptr = &i;
*++ptr=2;
printf("%d",i);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

23. What will be the final value of num1 and num2?

#include
int main()
{
long num1 = 0;
long num2 = 0;
long *pnum = NULL;
pnum = &num1;
*pnum = 2;
++num2;
num2 += *pnum;
pnum = &num2;
++*pnum;
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

24. What will be the output of the below C program.

#include
int main()
{
int i = 0;
for(i = 3; i < 15; i + = 3)
{
print{("%d", i);
++i;
}
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option E

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

26. What will be output of the following "c" code?

#include
void main()
{
printf("%d",++5);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

27. What is the output of the following C Program?

#include
void main()
{
printf("%d", (a++));
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

28. What will be output of the following "c" code?

#include
void main()
{
int x =5;
x = (x++) + (++x) + (x) +(x--) + (--x);
printf("%d",x);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

29. What will be output of the following "c" code?

void main()
{
static int ver =5;
printf("%d", ver--);
if( ver);
main();
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

30. What will be output of the following "c" code?

#include
void main ( )
{
int i=5;
printf("%d %d %d %d %d", i++, i--,++i, --i, i);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!