
C Programming Day-10
Quiz
•
Engineering
•
University
•
Practice Problem
•
Medium
Vaishnavi K AIDS
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
1. What is the correct function to calculate the square root of a number in C?
sqrt()
pow()
sqr()
root()
Answer explanation
sqrt() returns the square root of a number. You must include math.h.
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What does the function pow(2, 3) return?
5
6
7
8
Answer explanation
pow(a, b) returns a raised to the power b.
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following functions returns the absolute value of a number?
mod()
absval()
fabs()
abs()
Answer explanation
For integers, the correct function is abs() (from stdlib.h)
For floating-point numbers, use fabs() (from math.h)
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which header file is needed for using ceil() and floor() functions?
stdio.h
stdlib.h
math.h
string.h
Answer explanation
ceil() gives the smallest integer ≥ number; floor() gives the largest integer ≤ number.
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What does floor(3.8) return?
4.0
3.5
3.8
3.0
Answer explanation
floor() rounds down to the nearest integer.
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What does strlen("hello") return?
5
4
Error
6
Answer explanation
strlen() counts characters in a string (excluding \0).
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which function is used to copy one string into another?
strcat()
strcpy()
strlen()
strrev()
Answer explanation
strcpy(destination, source) copies the source string into destination.
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Engineering
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
