
C programming Quiz
Authored by Sheetal Patil
Computers
1st Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Who is the father of C language?
Steve Jobs
James Gosling
Dennis Ritchie
Rasmus Lerdorf
Answer explanation
Dennis Ritchie
2.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following does not initialize ptr to null (assuming variable declaration of a as int a=0;)?
int *ptr = &a;
int *ptr = &a – &a;
int *ptr = a – a;
All of the mentioned
Answer explanation
int *ptr = &a;
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following C code?
#include <stdio.h>
int x = 0;
void main()
{
int *ptr = &x;
printf("%p\n", ptr);
x++;
printf("%p\n ", ptr);
}
Same address
Different address
Compile time error
Varies
4.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 0;
int *ptr = &x;
printf("%d\n", *ptr);
}
Address of x
Junk value
0
Run time error
5.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
#include <stdio.h>
int main()
{
char str[10] = "hello";
char *str1 = "world";
strncat(str, str1, 9);
printf("%s", str);
}
helloworld
Undefined behaviour
helloworl
hellowor
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Strcat() function adds null character
Only if there is space
Always
Depends on the standard
Depends on the compiler
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which keyword can be used for coming out of recursion?
break
return
exit
both break and return
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
6 класс тест повторение 3 четверти
Quiz
•
1st Grade
17 questions
Python Quiz
Quiz
•
1st - 5th Grade
15 questions
CCNA 200-301 ACL + NAT
Quiz
•
1st - 12th Grade
10 questions
6 сынып PYTHON тілінде программалау
Quiz
•
1st Grade
8 questions
Test Informatica final nivel1, C++
Quiz
•
1st Grade
10 questions
Diplo Variables
Quiz
•
1st - 10th Grade
10 questions
Q3 ADT ArrayList
Quiz
•
1st Grade
12 questions
Bài tập tiết 11, 12
Quiz
•
KG - 1st Grade
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Life Cycle of a Frog
Quiz
•
1st - 2nd Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
10 questions
100th Day of School 1st/2nd
Quiz
•
1st - 2nd Grade
15 questions
Reading Comprehension
Quiz
•
1st - 5th Grade
10 questions
Identifying Physical and Chemical Changes
Interactive video
•
1st - 5th Grade
10 questions
Exploring the American Revolution
Interactive video
•
1st - 5th Grade