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 are c++ stream classes?

790


Write a C++ Program to check whether a number is prime number or not?

868


Explain method of creating object in C++ ?

816


What is isdigit c++?

866


Why do we use double in c++?

815


What does ctime() do?

812


What is the difference between object-oriented programming and procedural programming?

912


In c++, what is the difference between method overloading and method overriding?

830


How do I tokenize a string in c++?

825


How to demonstrate the use of a variable?

859


What is prototype for that c string function?

894


What are static type checking?

827


What is the difference between the indirection operator and the address of oper-ator?

838


What do the header files usually contains?

820


Can I uninstall microsoft c++ redistributable?

804