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 |
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
C program code int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
What is formal argument?
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300,200,100
What is use of pointer?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
How can you invoke another program from within a C program?
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen)
What is the difference between exit() and _exit()?
Difference between linking and loading?