#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


Please Help Members By Posting Answers For Below Questions

Differentiate between calloc and malloc.

760


How can you be sure that a program follows the ANSI C standard?

1129


What are loops c?

616


In a switch statement, what will happen if a break statement is omitted?

602


What is the difference between union and anonymous union?

835






Which driver is a pure java driver

993


Write the control statements in C language

650


How can I find the modification date of a file?

705


What is double pointer in c?

588


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1381


Explain the difference between call by value and call by reference in c language?

647


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

594


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

669


What is masking?

637


what does static variable mean?

657