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 |
c program to subtract between two numbers without using '-' sign and subtract function.
how to find out the biggest element (or any other operation) in an array which is dynamic. User need not to mention the array size while executing.
What is the significance of scope resolution operator?
0 Answers Agilent, ZS Associates,
fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }
what different between c and c++
What is the purpose of macro in C language?
can we declare a variable in different scopes with different data types? answer in detail
What is the difference between printf and scanf )?
in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n
What's the best way to declare and define global variables?
what r the cpu registers r ther?
What is use of bit field?