#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
c language interview questions & answer
Write a code to determine the total number of stops an elevator would take to serve N number of people.
What are the c keywords?
Why do we use header files in c?
What are bitwise shift operators in c programming?
What are the types of type specifiers?
Differentiate between the expression “++a” and “a++”?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
Is there a way to jump out of a function or functions?
What is calloc in c?
How can I do graphics in c?
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.
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
How was c created?
write a proram to reverse the string using switch case?