We can define functions within structures but not within a union
We can define functions within union but not within a structure
The way memory is allocated
There is no difference
We can easily access each element
It is necessary to declare too many variables
It can store only one similar type of data
It is difficult to perform sorting operation on it
world
addition23
test-name
factorial
Variables created in a function cannot be used another function
Variables created in a function can be used in another function
Variables created in a function can only be used in the main function
None of the above
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
How many times the printf statement within the while loop will be executed?
int x=1; while(x=0) printf("hello");
1
0
infinite
2
int &p;
int *p[10];
int **p;
int *p[ ];
register
static
extern
auto
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
What will be the output of the following code?
int main() { int x,y,z; x='1'-'0'; /* line-1 */ y='a'-'b'; /* line-2 */ z=x+y; printf("%d",z); }
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
ptr++
*ptr
++ptr
++*ptr
To determine which operator evaluated first from left to right.
To determine the level of an operator in a program.
To determine how an expression involving more than one operator is evaluated.
To check the expression is valid or not.
main() { int x = 0, y = 0; if(x > 0) if(y > 0) printf("True"); else printf("False"); }
Blank screen
True
False
Error because of dangling else problem
What will be output if you compile and execute the following ‘C’ code?
void main() { float a=5.2; if(a==5.2) printf("Equal"); else if(a<5.2) printf("Less than"); else printf("Greater than"); }
float a=5.2; if(a==5.2) printf("Equal"); else if(a<5.2) printf("Less than"); else printf("Greater than"); }
Equal
Less than
Greater than
Compilation error
void main() { int i=4,x; x=++i + ++i + ++i; printf("%d",x); }
21
18
19
break
exit(0)
abort()
All of the mentioned
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
fend( )
endf( )
EOF
FEND
a value of 0
either 1 or 0
a value of 1
any positive integer
outside the function
throughout the program
only in the function where it is defined
surrounding of that function