1. What is the correct function to calculate the square root of a number in C?

C Programming Day-10

Quiz
•
Engineering
•
University
•
Medium
Vaishnavi K AIDS
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
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
Similar Resources on Quizizz
11 questions
Equilibrium & Truss

Quiz
•
University
10 questions
MWD Technology Quiz

Quiz
•
University
10 questions
Infix to Postfix Conversion Quiz

Quiz
•
University
11 questions
Conceptos de Orientación a Objetos en Python

Quiz
•
University
15 questions
Number Systems and Boolean Algebra

Quiz
•
University
9 questions
Sem III- OOP Module 4 (2024-25)

Quiz
•
University
15 questions
Cuestionario sobre Programación Lógica

Quiz
•
University
10 questions
Geometrical Constructions in Engineering

Quiz
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade