main()
{
int sub[50];
for(i=0; i<=48;i++)
{
sub[i]=i;
printf("
%d", sub[i]);
}
}
0 to 48 will be displayed
48
49
Compilation Error
An alphabet
A number
A special symbol other than underscore
both (b) and (c)
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
3.999999
Error
3
3.000000
float
string
int
wchar_t
An Editor
A compiler
An operating system
None of the above
const X* const
X* const
X*
X&
Type definitions (typedefs)
Class definitions
Function definitions
Template definitions
True
False
main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
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
True
False
True
False
True
False
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
while (1)
{i++;}
for( ; ; );
while (true)
{false = 1;}
do
{y = x;}
while (x==0);
What will be output if you will compile and execute the following c code?
#include
int main(){
char c=125;
c=c+10;
printf("%d",c);
return 0;
}
135
+INF
-121
-135
void main()
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}
2
1
100
0
putchar(65)
putchar('x')
putchar("x")
')
break
continue
exit
All of the above
a = 5
a += 5
a = b = c
a = b
253
254
255
256
True
False
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
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
**, * or /, + or -
**, *, /, +, -
**< /< *< +<-
/ or *, - or +
abstract
Virtual
Dynamic
Typeid
True
False
#include
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}
1
64
320
Compiler Error
#if
#elseif
#undef
#pragma