What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
What is the output of the following code:
int x = 5;
printf("%d", x++);
4
5
6
Undefined
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
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
8
16
1
Decimal
Binary
Octal
Hexadecimal
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
What is the output of the following code?
int a = 10, b = 5;printf("%d", a / b);
2
0.5
15
char > int > float
int > char > float
char < int < double
double > char > int
“programming Trick”
“programming"
‘programming'
$ programming $
scanf()
getch()
getche()
gets()
-4
-2.8
+2.8
+3
int number;
float rate;
int variable_count;
int $main;
//
/
#
/*
*
&
%
&&
||
!
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.
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
LowerCase letters
UpperCase letters
CamelCase letters
None of these
System programming language
General purpose language
Data processing language
None of the above
A
B
ADA
C++
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
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
world
addition23
test-name
factorial
30
32
36
40
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
int num;
integer num;
num int;
num integer;
1return
return1
return
$return_1
signed short
unsigned short
long
int
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
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
float, double
short int, double, long int
float, double, long double
double, long int, float
compare two numeric values
combine two numeric values
compare two boolean values
<
=
>=
<=
Input data
The program does not require any function.
Output data
The program must have at least one function.
void
endl
float
switch
double
char
array
A number
A special symbol other than underscore
Both of the above
An alphabet
Constants
Keywords
Operators
Tokens
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
1020
10+20
Compiler error
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
| |
All of the above
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
Id_No
ID_NO
IdNo
Id No
include
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
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
Martin Richards
Dennis Ritchie
Ken Thompson
Herman Hellorith
2.5
2.000000
2.500000