What is output of below program?
int main()
{
const int a = 10;
printf("%d",++a);
return 0;
}
C CODE MASTER
Quiz
•
Computers
•
Professional Development
•
Hard
Amartya Vishwakarma
Used 4+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output of below program?
int main()
{
const int a = 10;
printf("%d",++a);
return 0;
}
Runtime error
10
11
Compilation error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following program where is the variable a getting defined and where it is getting declared?
#include<stdio.h>
int main()
{
extern int a;
printf("%d\n", a);
return 0;
}
int a=20;
int a = 20 is declaration, extern int a is the definition
extern int a is declaration, int a = 20 is the definition
int a = 20 is definition, a is not defined
a is declared, a is not defined
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
0 , 0.000
1 , 1.000
Compile time error
Garbage value
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output of the below program?
int main()
{
int i,j;
for(i = 0,j=5;i<5;i++,--j)
{
printf("%d%d--",i,j);
}
return 0;
}
55--64--73--82--91--
50--61--72--83--94--
Compilation Error
50--41--32--23--14--
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output
int main()
{
int a = 320;
char *ptr;
ptr =( char *)&a;
printf("%d",*ptr);
return 0;
}
32
64
128
320
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what will be the output of the code.
#include<stdio.h>
#include<string.h>
int main()
{
char arr[] = "Breakpoints";
printf("%d-%d",sizeof(arr), strlen(arr));
return 0;
}
12-11
11-11
11-12
12-12
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the size of the array is less than the number of initializers
then :-
Generates an error message
Extra values are being ignored
Size is neglected when values are given
Size of Array is increased
11 questions
Java Fundamentals
Quiz
•
Professional Development
10 questions
Java Increment & Decrement Operators
Quiz
•
Professional Development
15 questions
BrightChamps Technical Round - C language
Quiz
•
Professional Development
20 questions
PL SQL
Quiz
•
University - Professi...
20 questions
first round quiz
Quiz
•
Professional Development
15 questions
Code X Trade
Quiz
•
Professional Development
11 questions
JAVA QUIZ
Quiz
•
Professional Development
13 questions
MindSpace Computers C Quiz-1 2025
Quiz
•
Professional Development
25 questions
Equations of Circles
Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)
Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System
Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice
Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers
Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons
Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)
Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review
Quiz
•
10th Grade