f()
{
int a=2;
f1(a++);
}
f1(int c)
{
printf("%d", c);
}
c=?
Answers were Sorted based on User's Feedback
Answer / jack
in line 4, a's value is pushed on to stack and then
increaments.........In line 6 the function f1 pops the a's
value and assigned to c so .......c is value is 2.......
Is This Answer Correct ? | 7 Yes | 2 No |
Answer / viji
a++ is postfix operator so it first assigns its values and
then incremented. In above statement the value of a is first
assigned to c and then increment. so the output of c is 2;
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / banavathvishnu
a value will be first assigned to C in the Function and
latter it will be incremented in f() function.
so the value C remains 2
Is This Answer Correct ? | 0 Yes | 0 No |
Is flag a keyword in c?
What is indirect recursion? give an example?
When should a type cast be used?
main() { int a[10]; printf("%d",*a+1-*a+3); }
what is array?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is the difference b/w main() in C language and main() in C++.
main() {int i=5; // line 1 i=(++i)/(i++); // line 2 printf("%d",i); // line 3 } output is 2 but if we replace line 2 and line 3 by printf("%d",i=(++i)/(i++)); then output is 1. Why?
What are the different types of errors?
What is structure packing in c?
what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }
develop algorithms to add polynomials (i) in one variable