Quiz-1
Q 1.
What will be the output of the following code snippet? / निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
#include <stdio.h>
int main(){
void num=10;
printf("%v", num);
return 0;
}
- Compilation error
- 10
- Garbage value
Q 2.
What will be the output of the following code snippet? / निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
#include <stdio.h>
void main()
{
int a=1, b=2, c=3, d;
d = (a=c, b+=a, c=a+b+c);
printf("%d %d %d %d", d, a, b, c);
}
- 11 3 5 11
- 11 1 5 11
- 11 3 2 11
- 11 3 3 11
Q 3.
What will be the output of the following code snippet? / निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
#include <stdio.h>
int main() {
int c = - -14;
printf("%d", c);
return 0;
}
- 13
- 14
- -14
- Compile Time Error
Q 4.
What will be the output of the following code snippet? / निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
#include <stdio.h>
int num = 10;
int main() {
int num = num;
printf("%d ", num);
return 0;
}
- 10
- Depends on the compiler
- Garbage
Q 5.
Which operation will perform first as per the following code snippet? / निम्नलिखित कोड स्निपेट के अनुसार कौन सा ऑपरेशन पहले प्रदर्शन करेगा?
#include <stdio.h>
int main() {
int num = num;
printf("%d ", num);
return 0;
}
- Assignment Operation
- Variable Declaration
- Run Time Error
- Compile Time Error
Q 6.
What would be the output obtained out of the program mentioned below? / नीचे उल्लिखित कार्यक्रम से क्या परिणाम प्राप्त होगा?
#include<stdio.h>
void main()
{
int x = 10;
char x = ‘A’;
printf("%d", x)
}
- 10
- A
- 65
- Compile Time Error
Q 7.
What would be the output obtained out of the program mentioned below? / नीचे उल्लिखित कार्यक्रम से क्या परिणाम प्राप्त होगा?
#include <stdio.h>
int main()
{
int v= 12,13,14;
int z;
z= (12,13,14);
printf(“v= %d, z= %d\n”,v,z);
return 0;
}
- v= 13, z= 14
- v= 12, z=13
- v= 12, z= 14
- Compile-time Error
Q 8.
What will be the output of the following code snippet? / निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
#include <stdio.h>
int main() {
int scanf = 10;
printf("%d",scanf);
return 0;
}
- 10
- Garbage Value
- Compile Time Error
Q 9.
What will be the output of the following code snippet? / 29. निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
#include <stdio.h>
int main() {
int a = 20=30=50;
printf("%d",a);
return 0;
}
- 10
- 30
- 50
- Compile Time Error
Q 10.
What will be the output of the following code:- / निम्नलिखित कोड का आउटपुट क्या होगा:-
#include <stdio.h>
int a = 60;
int main() {
int a = 110;
{
extern int a;
printf("%d ",a);
}
printf("%d",a);
return 0;
}
- 110 110
- 60 110
- 110 60
- Garbage 110