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
B. the variable must always be the letter i when using a for loop
True
False
main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
void main()
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}
2
1
100
0
main()
{
xyz: goto abc;
printf("Hello");
abc: printf("World");
goto xyz;
}
Infinite loop
Hello World
World Hello
Compilation error
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
True
False
True
False
Explicit
Public
Implicit
Private
printf("%d%d", book.price, book.page);
printf("%d%d", price.book, page.book);
printf("%d%d"< price::book< page::book);
printf("%d%d", price>book, page>book);
the question mark should be an equal sign
the first semicolon should be a colon
there are too many variables in the statement
the conditional operator is only used with apstrings
putchar(65)
putchar('x')
putchar("x")
')
Dennis Ritchie
Ken Thompson
Bill Gates
Peter Norton
True
False
main()
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}
0
Nothing will be displayed
Infinite loop
None of the above
High Level and Procedural
Low Level and OOPS
Middle Level and Procedural
Machine Level and OOPS
A
B
BCPL
C++
91
88
90
89
True
False
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
3.999999
Error
3
3.000000
True
False
std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
0
NULL
1
none of the above
True
False
the return 0; statement
the first statement after the loop
the statement following the continue statement
the next iteration of the loop
pointers to strings
string to pointer
both
abstract
Virtual
Dynamic
Typeid
True
False
True
False
Positive value
Zero
Negative value
None of these
True
False