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.
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
*
&
%
#
What will be the output of the following code segment?
int x = 24, y = 39, z = 45;z = x + y;y = z - y;x = z - y;printf("\n%d %d %d", x, y, z);
24 39 63
39 24 63
24 39 45
39 24 45
world
addition23
test-name
factorial
Constants
Keywords
Operators
Tokens
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
AT & Ts Bell Laboratories of USA in 1972
AT & Ts Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
int num;
integer num;
num int;
num integer;
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
A
B
ADA
C++
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
infomax
info_max
info max
All of these
Input data
The program does not require any function.
Output data
The program must have at least one function.
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.
1return
return1
return
$return_1
1
-1
2
&&
| |
!
All of the above
||
int number;
float rate;
int variable_count;
int $main;
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
scanf()
getch()
getche()
gets()
Binary operator
Unary operator
Ternary operator
int x = 5;printf("%d", ++x);
4
5
6
7
An Editor
A compiler
An operating system
None of these
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
int
float
include
char
//
/
/*
Logical Operator
Conditional Operator
typecast
Ternary
Id_No
ID_NO
IdNo
Id No
Depends on the system
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
char > int > float
int > char > float
char < int < double
double > char > int
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
real
double
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
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
What will be the output of the following pseudo code ?
Integer aSet a =4do print a + 2 a = a-1while (a not equals 0)end while
6 6 6 6
6 5 4 3
6 7 8 9
6 8 10 12
3
no of students
7th
myName
What is the output of the following code?
int a = 5;printf("%d", a == 5);
Undefined
Algorithm
Flow-Charts
Procedural
Object Oriented
Either True or False
is less than or is more than
is equal or less or more
2.5
2.000000
2.500000
-4
-2.8
+2.8
+3
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