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);}
0
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
2 bytes
4 bytes
8 bytes
1 byte
*
+
++
&&
&
%
#
float
real
int
double
start()
printf()
main()
getch()
1
-1
2
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
None of the above
4
Depends on the system
Creating Style Sheets
Cascading Style Sheets
Computer Style Sheets
Colorful Style Sheets
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.
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
Compilation error
infomax
info_max
info max
All of these
compare two numeric values
combine two numeric values
compare two boolean values
30
32
36
40
Logical Operator
Conditional Operator
typecast
Ternary
print("Hello World");
echo("Hello World");
printf("Hello World");
None of these
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
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
8
16
put together the file and functions that are required by the program
translate the instructions into a form suitable for execution by the program
load the executable code into the memory and execute them
allow the user to type the program
print()
scanf()
input()
All of the above
void
endl
switch
It returns the size of the variable in bits
It returns the size of the variable in bytes
It returns the size of the variable in kilobytes
It returns the number of elements in an array
include
char
Personal Hyper Pretext
Pretext Hypertext Processor
Hypertext Preprocessor
Preprocessor Home Page
volatile
true
friend
export
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
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.
Adobe Dreamweaver
Apache
IIS
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
//
/* */
What is the output of the following code?
int a = 10, b = 5;printf("%d", a / b);
5
0.5
15
char > int > float
int > char > float
char < int < double
double > char > int
getchar()
gets()
cin.get()
int x = 5;printf("%d", ++x);
6
7
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 num;
integer num;
num int;
num integer;
Compiler
Interpreter
Assembler
None of These
3
A
B
ADA
C++
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
| |
!
<
=
>=
<=
long double
far double
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
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
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.
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration