
C Programming Lab
Authored by karthick k
Computers
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
COMPUTER & INTERNET ESSENTIAL
Quiz
•
Professional Development
10 questions
Computer Hardware and Software Quiz
Quiz
•
Professional Development
15 questions
JDBC_Objective_Exam_2
Quiz
•
Professional Development
20 questions
Software Development and SuccessMaker Quiz
Quiz
•
Professional Development
17 questions
Introduction to Computer Systems: Basic elements
Quiz
•
University - Professi...
13 questions
Functions
Quiz
•
5th Grade - Professio...
10 questions
Kuis Array
Quiz
•
Professional Development
10 questions
Structure Data Review
Quiz
•
University - Professi...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...