
quiz
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Soniga M
FREE Resource
Enhance your content in a minute
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which is valid C expression?
a) int my_num = 100,000;
b) int my_num = 100000;
c) int my num = 1000;
d) int $my_num = 10000;
a
b
c
d
Answer explanation
Space, comma and $ cannot be used in a variable name.
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following cannot be a variable name in C?
a) volatile
b) true
c) friend
d) export
a
b
c
d
Answer explanation
Volatile is C keyword.
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is short int in C programming?
a) The basic data type of C
b) Qualifier
c) Short is the qualifier and int is the basic data type
d) All of the mentioned
a
b
c
d
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Functions in C Language are always _________
a) Internal
b) External
c) Both Internal and External
d) External and Internal are not valid terms for functions
a
b
c
d
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int y = 10000;
int y = 34;
printf("Hello World! %d\n", y);
return 0;
}
Compile time error
Hello World! 34
Hello World! 1000
Hello World! followed by a junk value
Answer explanation
Since y is already defined, redefining it results in an error.
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will happen if the following C code is executed?
#include <stdio.h>
int main()
{
int main = 3;
printf("%d", main);
return 0;
}
It will cause a compile-time error
It will cause a run-time error
It will experience infinite looping
It will run without any error and prints 3
Answer explanation
C program can have same function name and same variable name.
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the final value of x in the following C code?
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}
3.75
Depends on compiler
24
3
Answer explanation
9/3=3
5*3=15
15+9=24
ans 24
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
Programación II Parte 5
Quiz
•
University
13 questions
Podsumowanie: binarny, komputer, sieć
Quiz
•
7th Grade - University
10 questions
Quiz Ke 8 alprog if-09
Quiz
•
University
10 questions
História da Matemática
Quiz
•
University
15 questions
Herramientas de Google
Quiz
•
12th Grade - University
12 questions
Javascript
Quiz
•
University
16 questions
Quiz on List and Tuples
Quiz
•
University
10 questions
Gebang Logika
Quiz
•
University
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
