Explicit
Public
Implicit
Private
C. Implicit
main()
{
unsigned int a = 10;
while (a>=10)
{
int a; a-- ;
}
printf("%i", a);
}
Infinite loop
9
0
None
True
False
#define sqr(x= x*x)
main()
{
int a = 10, b = 5;
printf("%d, %d", sqr(a+b),sqr(++a));
}
77, 121
225, 121
77< 144
Compilation error
True
False
True
False
main()
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}
0
Nothing will be displayed
Infinite loop
None of the above
to go to the next iteration in a loop
come out of a loop
exit and return to the main function
restarts iterations from beginning of loop
What will be output if you will compile and execute the following c code?
#include
#define x 5+2
int main(){
int i;
i=x*x*x;
printf("%d",i);
return 0;
}
27
343
233
Compiler Error
Storage
Virtual
Friend
Wrapper
delete
concatenate
compare
none of the above
Dennis Ritchie
Ken Thompson
Bill Gates
Peter Norton
True
False
True
False
True
False
An alphabet
A number
A special symbol other than underscore
both (b) and (c)
Keywords have some predefine meanings and these meanings can be changed.
Keywords have some unknown meanings and these meanings cannot be changed.
Keywords have some predefine meanings and these meanings cannot be changed.
None of the above
True
False
Sequential
Random
Sequential and Random
None of the above
True
False
std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
the logical operator && cannot be used in a test condition
the while loop is an exit-condition loop
the test condition is always true
the test condition is always false
Positive value
Zero
Negative value
None of these
0
NULL
1
none of the above
True
False
True
False
''
" "
'a'
abc'
#include
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}
1
64
320
Compiler Error
for
while
do-while
while & do-while
pointers to strings
string to pointer
both
int ~Country()
void Country()
int ~Country(Country obj)
void ~Country()