-
-
-
-
Output of ++i + ++i + i + --i?
What will be the output of ++i + ++i + i + --i when i=5?
Compiler says output is 27. How? -
Pre and post increment operators
Why does ++i * ++i give 49 when i=5?
-
What is the difference in C and Java ?
Why the c use only compiler ? while java used both interpreter as well as compiler ?
-
Where is the function declared as static stored in memory?
The usage of static with a function or variable restricts their scope.Is this behaviour memory related?
-
Garbage Value
In C if a variable is not assigned a value then why does it take garbage value?
-
Logical Operator and Pre-increment Operator
what is the output of the following program
int x,y,z;
x=y=z=1;
z=++x||++y &&++z;
printf("%d,%d,%d",x,y,z);
return 0;
-
What are the characteristics of arrays in C?
1) An array holds elements that have the same data type 2) Array elements are stored in subsequent memory locations3) Two-dimentional array elements are stored row by row in subsequent memory locations.4) Array name represents the address of the starting element5) Array size should be mentioned in the declaration. Array size must be a constant expression...
-
Size of structure
struct {
int a : 8;
int b : 10;
int c : 12;
int d : 4;
int e : 3;
int : 0;
int f : 1;
char g;
} A;
what is the size of structure. size of bitfields with out character allocation is 48 bytes. so it is taking 4+4 =8 bytes. what about memory for character. Why memory for char is not allocated seperately. I am... -
-
C if condition Puzzle
What's the "condition" so that the following codesnippet prints both HelloWorld !if "condition"printf ("Hello");elseprintf("World");
Ans