How much is size of struct having 1 char & 1 integer?

Answer Posted / chinmay

#include<stdio.h>
#include<conio.h>

void main()
{
struct idk
{
char ch;
int i;
}abc;

printf("size of structure is: %d",sizeof(abc));
getch();

}

O/P is 3

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does floor mean in c++?

846


Which is best ide for c++?

789


How would you obtain segment and offset addresses from a far address of a memory location?

865


What is iostream in c++ used for?

767


What is a .lib file in c++?

790


What is the full form nasa?

796


What is using namespace std in cpp?

794


Explain linked list using c++ with an example?

839


what are Operators and explain with an example?

973


What is ctime c++?

884


Can member data be public?

815


Describe the process of creation and destruction of a derived class object?

899


How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

876


What is #include sstream?

827


What is the use of string in c++?

793