A
B
BCPL
C++
253
254
255
256
True
False
An alphabet
A number
A special symbol other than underscore
both (b) and (c)
putchar(65)
putchar('x')
putchar("x")
')
True
False
main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
int num[6] = { 2, 4, 12, 5, 45, 5 } ;
int n{} = { 2, 4, 12, 5, 45, 5 } ;
int n{6} = { 2< 4< 12 } ;
int n(6) = { 2, 4, 12, 5, 45, 5 } ;
Simple Template Library
Standard Template Library
Static Type Library
Single Type-based Library
delete
concatenate
compare
none of the above
abstract
Virtual
Dynamic
Typeid
string.h
strings.h
text.h
strcmp.h
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}
21 21
20 21
21 20
20 20
int f(int a, int b);
void main()
{
int a = 12, b=154;
printf("%d", f(a, b));
}
int f(int a, int b)
{
if (a<b) return(f(b, a));
if(b==0) return(a);
return (f(b, a % b));
}
2
1
Compilation error
Runtime error
Throw by value and catch by reference.
Throw by reference and catch by reference.
Throw by value and catch by value
Throw the pointer value and provide catch for teh pointer type.
Explicit
Public
Implicit
Private
True
False
std::vector
std::list
std::map
std::set
True
False
True
False
An Editor
A compiler
An operating system
None of the above
Dennis Ritchie
Ken Thompson
Bill Gates
Peter Norton
1 byte
4 bytes
8 bytes
16 bytes
float a =123.56;
char ch ='T' * 'A';
char ch ='T' *20;
3 +a = b;
True
False
True
False
True
False
void main()
{
int a = 0;
while (a<=50) for(;;) if(++a % 50==0) break;
printf("a = %d", a);
}
a = 100
a = 50
compilation error
runtime error
double and chars
floats and doubles
ints and floats
ints and chars
the increment should always be ++k
the variable must always be the letter i when using a for loop
there should be a semicolon at the end of the statement
the commas should be semicolons