What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
int number;
float rate;
int variable_count;
int $main;
char
int
float
double
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.
Constants
Keywords
Operators
Tokens
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
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.
A
B
ADA
C++
Logical Operator
Conditional Operator
typecast
Ternary
start()
printf()
main()
getch()
void
endl
switch
1
-1
0
2
-4
-2.8
+2.8
+3
print()
scanf()
input()
All of the above
Binary operator
Unary operator
Ternary operator
float, double
short int, double, long int
float, double, long double
double, long int, float
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
Compiler
Interpreter
Assembler
None of These
&&
| |
!
“programming Trick”
“programming"
‘programming'
$ programming $
real
What is the output of the following code?
int a = 10, b = 5;printf("%d", a / b);
5
0.5
15
getchar()
gets()
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
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
int x = 5;printf("%d", ++x);
4
6
7
no of students
7th
myName
long double
far double
signed short
unsigned short
long
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.
8
*
&
%
#
-5
+5
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
10
20
None
32
36
40
//
/
/*
Spaces
Digits
Underscores
Letters
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
16
immutable
mutable
const
volatile
world
addition23
test-name
factorial
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
System programming language
General purpose language
Data processing language
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
Input data
The program does not require any function.
Output data
The program must have at least one function.
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