main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
Answer Posted / hemachandar
the first ('3') value goes to char., so it takes 1.
then for second ("3") value takes the string., string value takes 2.
for third (3), its int., so it takes the value of 2.
Every printf takes the values from right to left, so it takes the output as 2 2 1.
Simple!!!
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is meant by realloc()?
Is c is a procedural language?
What is the use of linkage in c language?
how to execute a program using if else condition and the output should enter number and the number is odd only...
Explain what is the difference between #include and #include 'file' ?
What is a floating point in c?
Explain what is the stack?
What is a string?
hi send me sample aptitude papers of cts?
Explain setjmp()?
How can I determine whether a machines byte order is big-endian or little-endian?
Explain the array representation of a binary tree in C.
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
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.
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }