getchar()
gets()
scanf()
cin.get()
immutable
mutable
const
volatile
A
B
ADA
C++
What is the output of the following code?
int a = 10, b = 5;printf("%d", a / b);
5
2
0.5
15
ctype.h
stdio.h
conio.h
math.h
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
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.
start()
printf()
main()
getch()
&&
| |
!
All of the above
Decimal
Binary
Octal
Hexadecimal
it Compare the variable a and the variable b are same.
The value of b is assigned to variable a but if b changes later, it will not effect the value of variable a.
The value of b is assigned to variable a but if b changes later, it will effect the value of variable a.
The value of variable a is assigned to variable b, and the value of variable b is assigned to variable a.
Read
Write
Execute
Copy
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
getche()
char str[] = "Hello";
char str = "Hello";
string str = "Hello";
char str[] = {'H', 'e', 'l', 'l', 'o'};
Constants
Keywords
Operators
Tokens
2 bytes
4 bytes
8 bytes
1 byte
Compiler
Interpreter
Assembler
None of These
LowerCase letters
UpperCase letters
CamelCase letters
None of these
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
float, double
short int, double, long int
float, double, long double
double, long int, float
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
for loop
while loop
do-while loop
None of the above
infomax
info_max
info max
All of these
Binary operator
Unary operator
Ternary operator
1return
return1
return
$return_1
It exits the current loop and continues with the next iteration
It terminates the current loop and transfers control to the next statement after the loop
It skips the current iteration and moves to the next iteration
It repeats the current iteration
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
static
new
-4
-2.8
+2.8
+3
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Compilation error
Error
true
friend
export
What will be output if you compile and execute the following ‘C’ code?
void main(){int i=4,x;x=++i + ++i + ++i;printf("%d",x);}
21
18
19
strlen()
sizeof()
length()
strlength()
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
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
none of the above
4
1
Depends on the system
-5
0
+5
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.
int arr[10][10];
int arr[10,10];
array int arr[10][10];
int arr{10}{10};
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
Id_No
ID_NO
IdNo
Id No
It is used to define global variables
It is used to define a macro
It is used to include standard or user-defined header files in the program
It is used to include comments in the code
stdlib.h
fclose()
closefile()
fileclose()
endfile()
is executed only once if the conditions is true
is also known as entry-controlled loop
is executed at least once if the conditions is false
the unconditional loop
int number;
float rate;
int variable_count;
int $main;
2.5
2.000000
2.500000