
C quiz

Quiz
•
Computers
•
University
•
Hard
Pranay Adak
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
"system()" function is prototyped in
<stdio.h>
<stdlib.h>
<system.h>
<alloc.h>
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Upon failing the execution of "system()" function the return value is
NULL
-1
0
Exit code of the command
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
int main(void)
{
main();
return 0;
}
The code will result in
Infinite loop
Compile time error
Runtime exception
Stack overflow
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
The output of the following code
int main(void)
{
printf("%d",printf("%d",0x11));
return 0;
}
111
172
112
216
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following code
int main(void)
{
int i=-5,j=3;
for(;i<j;i++,j--){}
printf("%d%d",j,i);
return 0;
}
-1-1
-20
0-2
compiler error
6.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
What will be the output of the following code
int main(void)
{
int a[5]={2,7,9,4,-1};
printf("%d",*(a+5));
return 0;
}
-1
Garbage value
Runtime Error
Compilation error
7.
MULTIPLE CHOICE QUESTION
20 sec • 2 pts
A two dimensional array is defined as "int a[m][n]", the address of the element a[i][j] is
a+(i*(n-1)*(sizeof(int)))+(j*(m-1)*(sizeof(int)))
a+(i*n*(sizeof(int)))+(j*(sizeof(int)))
a+(i*(m-1)*(sizeof(int)))+(j*(sizeof(int)))
a+(i*n*(sizeof(int)))+(j*m*(sizeof(int)))
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
C Program Array and strings

Quiz
•
University
15 questions
CIS1101-programming practice

Quiz
•
University
13 questions
PRF192 C Programming

Quiz
•
University
10 questions
pointers and structures

Quiz
•
University
10 questions
Arrays

Quiz
•
University
10 questions
C Viva

Quiz
•
University
11 questions
C Programming (Veri Tipi Dönüşümleri)

Quiz
•
University
10 questions
Arrays in C (II yr 02.07.2020)

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University