#include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
Answer Posted / jugal
Sorry guys,
my bad,
i thought it was
#define sqr(x) ((x)*(x))
the output wud be 5
but still the value of will be 2 only
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Is main an identifier in c?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
please explain every phase in the "SDLC" in the dotnet.
What does printf does?
What is register variable in c language?
How can I find the modification date of a file?
Why do we use & in c?
can we have joblib in a proc ?
What is the explanation for cyclic nature of data types in c?
How is actual parameter different from the formal parameter?
What are local variables c?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
What are the types of assignment statements?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
What do header files do?