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 the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
how to compare two strings without using strcmp() function??
What is function what are the types of function?
What is the basic structure of c?
How do we select the big element or any other operation from array which is read dynamically. user need to give the elements only no need to mention the size.
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
Explain what is wrong in this statement?
#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }
which will be first in c compiling ,linking or compiling ,debugging.
what is the maximum no. of bytes calloc can allocate
what is the difference between arrays and linked list
26 Answers MAHINDRA, Tech Mahindra, Wipro,
What will happen when freeing memory twice