PONJESLY
COLLEGE OF ENGINEERING
TEST
YOUR C-
SKILS
- What will be the output of the following program?
#include<stdio.h>
int
x= 40 // Global
Declaration
void
main()
{
int
x=20; // Local
Declaration
printf(“\n%d”,
x);
}
- What will be the output of the following program?
#include<stdio.h>
void
main()
{
int
x= 40 //Local
Variable
{
int
x=20; // Most
Local variable
printf(“\n%d”,
x);
}
printf(“\n%d”,
x);
}
Answers:- 20, Whenever there is a conflict between a local variable and a global variable, the local variable will get the priority.
- 20 40, Now both are local variables. In this case the most local variable will get the priority.
By,
IT
Department,PJCE
LOGICAL
MATHS
INSERT
THE MISSING NUMBER
12 6 18
40 5 ?
a) 45 b) 30 c) 60 d) 35
2. 175 (576) 463
192 ( ) 357
a) 288 b) 82 c) 330 d) 357
3. 514, 258, 130, 66?
a) 34 b) 33 c) 36 d) 38
4. 15 7 10 12
25 5 7 ?
16 8 4 20
a) 27 b) 13 c) 23 d) 47
5. 8,17,33,67,133, ?
a) 264 b) 265 c) 266 d) 267
ANSWERS:
- b
- c
- a
- c
- d
By
JEYA PRABHA.R
IV IT
No comments:
Post a Comment