Write a simple program to find the size of different basic
data types in C.

Answer Posted / rajiv

int x,y,b;
char a;
x=sizeof(y);
b=sizeof(a);
printf("the size of int is %d & the size of char is
%d",x,b);

Is This Answer Correct ?    20 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Under what circumstances does a name clash occur?

690


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

1916


What is the most efficient way to count the number of bits which are set in an integer?

591


What are unions in c?

580


What is the difference between a string and an array?

708






a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

632


Write a factorial program using C.

643


What do you mean by c?

587


What is the meaning of && in c?

548


What is zero based addressing?

713


What is a pointer and how it is initialized?

609


What are conditional operators in C?

623


What is the return type of sizeof?

593


How can I dynamically allocate arrays?

592


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

606