power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
Call by reference
Call by value
Call by reference by passing base address to a function
Both A and C
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
switch
goto
go back
return
signed short
unsigned short
long
int
Consider the following code and How many bytes of memory will be allocated?
int *ptr = (int *)malloc(10 * sizeof(int));
10 bytes
20 bytes
80 bytes
40 bytes
do-while
if-else
for
while
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
9
0
1
getchar()
gets()
scanf()
cin.get()
exit
break
continue
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.
fclose()
closefile()
fileclose()
endfile()
Compiler
Interpreter
Assembler
None of These
strlen()
sizeof()
length()
strlength()
What is the output of the following code?
main(){ int a, b; a=b=4; b=a++; printf("%d %d %d %d", a++, --b, ++a, b--);}
5 3 7 3
Syntax error
5 4 5 3
6 2 6 4
2.5
2
2.000000
2.500000
int a = 5, b = 10;if (a < b)printf("a is less than b");elseprintf("a is greater than or equal to b");
a is greater than or equal to b
a is less than b
Compiler Error
Undefined
malloc()
free()
calloc()
realloc()
for loop
while loop
do-while loop
none of the above
Both can occur multiple times, but a declaration must occur first.
A definition occurs once, but a declaration may occur many times.
Both can occur multiple times, but a definition must occur first.
A declaration occurs once, but a definition may occur many times.
world
addition23
test-name
factorial
int number;
float rate;
int variable_count;
int $main;
4
Depends on the system
A number
A special symbol other than underscore
Both of the above
An alphabet
int a(char *s)
void b(int a[], int n)
float *c()
short d(long x)
Spaces
Digits
Underscores
Letters
Keywords can be used as variable names
Variable names can contain digits
Variable names do not contain blank spaces
Capital letters can be used in variable names.
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
Algorithm
Flow-Charts
Procedural
Object Oriented
“programming Trick”
“programming"
‘programming'
$ programming $
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.
Nested structure
Recursive structure
Union structure
Inline structure
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
pair of parenthesis
semicolon
braces
colon
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
They can contain alphanumeric characters as well as special characters
It is not an error to declare a variable to be one of the keywords(like goto, static)
Variable names cannot start with a digit
Variable can be of any length
for (int i = 0; i < 10; i++)
for i = 0 to 10 step 1
for (i = 0; i < 10; i++)
for (i < 10; i++)
What will be output if you will compile and execute the following c code?
int main(){ int a=5; float b; printf("%d",sizeof(++a+b)); printf(" %d",a); return 0;}
2 6
4 6
2 5
4 5
They execute programs faster than compilers
They translate the entire program at once
They translate and execute code line by line
They are not used in modern programming
break stops the loop, continue skips the rest of the iteration
Both stop the loop
break skips to the next iteration, continue exits the loop
Both skip to the next iteration
float
include
char
Input data
The program does not require any function.
Output data
The program must have at least one function.
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
char str[] = "Hello";
char str = "Hello";
string str = "Hello";
char str[] = {'H', 'e', 'l', 'l', 'o'};
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Compilation error
Error
is executed only once if the condition is true.
is also known as entry-controlled loop.
is executed at least once if the condition is false.
is unconditional looping statement..
char > int > float
int > char > float
char < int < double
double > char > int
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
8
Constants
Keywords
Operators
Tokens