
C Programming Lab
Quiz
•
Computers
•
Professional Development
•
Medium
karthick k
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the scope of an external variable?
Whole source file in which it is defined
From the point of declaration to the end of the file in which it is defined
Any source file in a program
From the point of declaration to the end of the file being compiled
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of this C code?
#include <stdio.h>
void main()
{
int x = 97;
int y = sizeof(x++);
printf("x is %d", x);
}
x is 97
x is 98
x is 99
Run time error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the below c code?
#include <stdio.h>
void main()
{
char *s = "hello";
char *p = s;
printf("%p\t%p", p, s);
}
Different address is printed
Same address is printed
Run time error
Nothing
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of this C code?
#include <stdio.h>
struct student
{
char a[5];
};
void main()
{
struct student s[] = {"hi", "hey"};
printf("%c", s[0].a[1]);
}
h
i
e
y
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of this C code?
#include <stdio.h>
#define foo(m, n) m * n = 10
int main()
{
printf("in main\n");
}
In main
Compilation error as lvalue is required for the expression m*n=10
Preprocessor error as lvalue is required for the expression m*n=10
None of the mentioned
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of this C code?
void main ()
{
int a=2;
if(a==2)
{
a=~a+2<<1;
printf("%d",a);
}
else
{
a=~a;
}
}
6
-2
0
None of above
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Predict the output of the following C snippets
int main()
{
int main = 56;
printf("%d", main);
return 0;
}
Compiler Error
Depends on the compiler
56
none of above
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
11 questions
Capítulo 3
Quiz
•
University - Professi...
10 questions
Intro to Node.js
Quiz
•
Professional Development
20 questions
2. Ayo Main Quiz Lagi
Quiz
•
University - Professi...
15 questions
Scratch Text Operators
Quiz
•
KG - Professional Dev...
10 questions
Redux
Quiz
•
Professional Development
10 questions
Friday Fun
Quiz
•
Professional Development
20 questions
Sorting - IV year
Quiz
•
Professional Development
15 questions
Sec+ CH.1 Review Test
Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
21 questions
October 25
Quiz
•
Professional Development
10 questions
October Monthly Quiz
Quiz
•
Professional Development
20 questions
There is There are
Quiz
•
Professional Development
5 questions
SSUSH13
Interactive video
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
