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
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
Why pointer is used in c++?
How can you say that a template is better than a base class?
How do you generate a random number in c++?
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
What is private public protected in c++?
What is static function? Explain with an example
Differentiate between the manipulator and setf( ) function?
Are iterators pointers?
Is it possible to provide special behavior for one instance of a template but not for other instances?
Why is the function main() special?
Does dev c++ support c++ 11?
What is the basic structure of a c++ program?
Who calls main function?