
Programming in C

Quiz
•
Computers
•
University
•
Hard
Geetha Rani K
Used 11+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1.Which of the following is not necessary for every C program?
Header file
Preprocessor directive
The use of a keyword
The main function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2.Which of the following statements is incorrect about macros?
Macros and function calls work differently
It is always defined in capital letters
Macros can be undefined using #undef
You can declare macros with arguments
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3.Predict the output of the following code segment:
// Add stdio.h header file in below code
int main()
{
const int limit = 10;
limit++;
printf("%d", limit);
return 0;
}
Compile error
10
11
0
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4.Predict the output of the following code segment:
// Add stdio.h header file in below code
int main ()
{
char line [] = "Welcome to DataFlair tutorials on C Programming";
char string1[10], string2[10], string3[10];
sscanf (line,"%*s %*s %s %*s %*s %s %s",string1, string2, string3);
printf ("%s %s %s \n", string1, string2, string3);
return 0;
}
Welcome to Dataflair
Compilation error
DataFlair C programming
Welcome DataFlair to programming
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5.Which mathematical function would you use to round off 4.23 to 5?
ceil(4.23)
floor(4.23)
ceil(4.23, 5)
floor(4.23, 5)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6.Which of the following has a global scope in the program?
Formal parameters
Constants
Macros
Local variables
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7.Predict the output of the following code segment:
// Add stdio.h header file in below code
int main()
{
int array[10] = {3, 0, 8, 1, 12, 8, 9, 2, 13, 10};
int x, y, z;
x = ++array[2];
y = array[2]++;
z = array[x++];
printf("%d %d %d", x, y, z);
return 0;
}
10 9 10
9 10 9
9 9 10
None of the above
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
C Programming Quiz

Quiz
•
University
10 questions
Epics-2k24

Quiz
•
University
10 questions
C - Pointers

Quiz
•
University
15 questions
Coding club Summit Online Quiz

Quiz
•
University
10 questions
Basics Of C Programming

Quiz
•
University
15 questions
CODE ZENITH

Quiz
•
University
10 questions
หน่วยที่ 3 การเขียนโปรแกรมแบบตามลำดับ

Quiz
•
University
10 questions
Weekly Contest #3 - TechXNinjas

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University