print("Hello World");
echo("Hello World");
printf("Hello World");
None of these
A
B
ADA
C++
&
&&
||
!
Logical Operator
Conditional Operator
typecast
Ternary
void
endl
float
switch
1
2
3
4
-5
0
+5
Binary operator
Unary operator
Ternary operator
All of the above
no of students
char
7th
myName
signed short
unsigned short
long
int
start()
printf()
main()
getch()
What is the output of the following code:
int x = 5;
printf("%d", x++);
5
6
Undefined
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
Input data
The program does not require any function.
Output data
The program must have at least one function.
What is the output of the following code?
int a = 5;printf("%d", a == 5);
immutable
mutable
const
volatile
2.5
2.000000
2.500000
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
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.
-4
-2.8
+2.8
+3
Constants
Keywords
Operators
Tokens
System programming language
General purpose language
Data processing language
None of the above
Decimal
Binary
Octal
Hexadecimal
scanf()
getche()
gets()
1return
return1
return
$return_1
2 bytes
4 bytes
8 bytes
1 byte
Find the output of following code :
int main() { int i=-2; printf (“-i=%d”,-i); return b; }
–i=2
i=-2
–i=-2
–i=+2
include
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.
-1
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
print()
input()
When the following piece of code is executed, what happens?
b = 3;a = b++;
a contains 3 and b contains 4
a contains 4 and b contains 4
a contains 4 and b contains 3
a contains 3 and b contains 3
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
Compiler
Interpreter
Assembler
None of These
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
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
char > int > float
int > char > float
char < int < double
double > char > int
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
getchar()
cin.get()
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
compare two numeric values
combine two numeric values
compare two boolean values
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
30
32
36
40
Martin Richards
Ken Thompson
Herman Hellorith
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