f(x,y,z)
{
y = y+1;
z = z+x;
}
main()
{
int a,b;
a = 2
b = 2;
f(a+b,a,a);
print a;
}
what is the value of 'a' printed
Answers were Sorted based on User's Feedback
Answer / fazlur
Yes the answer will b 2 because the variable a is local to
the main function only.so the value of a will not b changed.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sachin arora
Answer a=2
because f is a function and that time STACK concept are
used ,in a function last value a is printed and a=2;
so result will b 2
| Is This Answer Correct ? | 0 Yes | 0 No |
What is header file in c?
what is calloc and malloc?
What are the general description for loop statement and available loop types in c?
Is null valid for pointers to functions?
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); } wat is the o/p and how?
How does the assert() function work?
What are pointers? What are stacks and queues?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
0 Answers Aspire, Infogain, TISL,
What is the modulus operator?
how to implement stack work as a queue?
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.
How can I set an array's size at run time?