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

Explain the concept of friend function in c++?

713


Is dev c++ free?

694


Why can’t you call invariants() as the first line of your constructor?

645


What is the main purpose of c++?

645


Describe friend function & its advantages.

803






Is multimap sorted c++?

652


What is a breakpoint?

651


Can we make copy constructor private in c++?

717


What is const pointer and const reference?

703


Does c++ support exception handling?

697


Is java a c++?

653


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

688


What is #include iomanip?

635


What is a stack? How it can be implemented?

789


How is new() different from malloc()?

737