
quiz

Quiz
•
Computers
•
University
•
Hard
Soniga M
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Common errors in C programming

Quiz
•
University
8 questions
Quiz - 1

Quiz
•
University
11 questions
C Language

Quiz
•
10th Grade - University
10 questions
Array in C

Quiz
•
University
10 questions
C Language

Quiz
•
University
10 questions
C_Quiz2

Quiz
•
University
10 questions
Day 7 Assessment -2

Quiz
•
University
10 questions
Looping in C

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University