#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 / azeem khan

Answer is 5

Is This Answer Correct ?    19 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

c language interview questions & answer

1452


Write a code to determine the total number of stops an elevator would take to serve N number of people.

722


What are the c keywords?

742


Why do we use header files in c?

569


What are bitwise shift operators in c programming?

637






What are the types of type specifiers?

616


Differentiate between the expression “++a” and “a++”?

691


which is conditional construct a) if statement b) switch statement c) while/for d) goto

729


Is there a way to jump out of a function or functions?

627


What is calloc in c?

652


How can I do graphics in c?

586


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

1624


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1591


How was c created?

583


write a proram to reverse the string using switch case?

2457