Diff: between this 2 classes in terms of memory
class A
{
int i;
char c;
double d;
};
class A
{
double d;
int i;
char c;
};
How it is calculating?



Diff: between this 2 classes in terms of memory class A { int i; char c; double d; };..

Answer / ashponni

Is the memory for double is assigned to int and char?

Is This Answer Correct ?    3 Yes 8 No

Post New Answer

More C Interview Questions

Write a program in c to input a 5 digit number and print it in words.

11 Answers  


Can I pass constant values to functions which accept structure arguments?

2 Answers  


what is use of loop?

10 Answers   Infosys,


what is the differance between pass by reference and pass by value.

7 Answers   Infosys,


#include<stdio.h> #include<conio.h> void main() { char ch='\356'; printf("%d",ch); } o/p=-18 why?plz.explain

2 Answers  






Write a C program to print 1 2 3 ... 100 without using loops?

15 Answers   Hindalco,


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

0 Answers  


what is the function of void main()?

8 Answers  


The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);

1 Answers   HCL, Public Service Commission,


int j =15,i; for (i=1; 1<5; ++i) {printf ("%d%d ",j,i); j = j-3; }

2 Answers  


write a “Hello World” program in “c” without using a semicolon?

9 Answers   CTS, TCS, Wipro,


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

0 Answers  


Categories