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 |
Explain what is the use of a semicolon (;) at the end of every program statement?
Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1
Can variables be declared anywhere in c?
what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....
What are valid signatures for the Main function?
how to count no of words,characters,lines in a paragraph.
Rapunzel walks into the forest of forgetfullness. She meets a Lion who lies on Monday Tuesdays and Wednesdays and meets a rabbit who lies on Thurs fridays and saturdays . On that day both say that "I lied yesterday". What day is it .
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
write a c/c++ programthat connects to a MYSQL server and checks if the INNoDB plug in is installed on it.If so your program should print the total number of disk writes by MYSQL.
write a program of palindrome(madam=madam) using pointer?
What is nested structure in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;