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

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

#include
long fu(int);
char vect[]={1,2,3,4,5};
void main(){
int i=1;
i=fu(++i)+ ++vect[++i]+ ++i+fu(i++);
printf("%d",i);
}
long fu(int x){
return x*3;
}

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!

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

#include
int main()
{
int i=i++,j=j++,k=k++;
printf("%d%d%d",i,j,k);

return 0;
}

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

Answer: Option B

Explanation:

An identifier is available to use in program code from the point of its declaration.
So expressions such as i = i++ are valid statements. The i, j and k are automatic variables and so they contain some garbage value. Garbage in is garbage out (GIGO).

Workspace

Tags:

No Tags on this question yet!

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

#include
int main(){
int x,a=3;
x=+ +a+ + +a+ + +5;
printf("%d %d",x,a);
return 0;
}

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!

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

#include
int main(){
int num,a=15;
num=- - - -a--;
printf("%d %d",num,a);
return 0;
}

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!

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

#include
int main(){
int num,i=0;
num=-++i+ ++-i;
printf("%d",num);
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!

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

#include
int main(){
int x,i=2;
x=~-!++i;
printf("%d",x);
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!

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

#include
int main(){
int x,a=2;
x=++a,++a,a++;
printf("%d %d",x,a);
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!

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

#include
int main(){
int num,a=5;
num=-a--+ +++a;
printf("%d %d",num,a);
return 0;
}

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!

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

#include
void main()
{
int i=2;
printf ("%d%d", ++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!

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

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

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

Answer: Option D

Explanation:

lvalue required as increment operand

Workspace

Tags:

No Tags on this question yet!