Updated: Apr 2026
Mock 1 - 100% FREE

CMI Data Science Mock Tests

Practice CMI Data Science mock tests with 12 full-length tests and 490+ questions. Real exam interface, All India ranking, and detailed analytics. First mock FREE!

12
Mock Tests
490+
Questions
FREE
First Mock
AIR
Ranking
Start Free Mock Test →

Available Mock Tests

FREE

Mock Test 1

55 Questions • 3 Hours • Full Analytics
Start Free →

Mock Test 4

55 Questions • 3 Hours • Full Analytics
Unlock

Mock Test 2

55 Questions • 3 Hours • Full Analytics
Unlock

Mock Test 5

55 Questions • 3 Hours • Full Analytics
Unlock

Mock Test 7

55 Questions • 3 Hours • Full Analytics
Unlock

Mock Test 8

55 Questions • 3 Hours • Full Analytics
Unlock

Special Mock 2

55 Questions • 3 Hours • Full Analytics
Unlock

Mock Test 10

55 Questions • 3 Hours • Full Analytics
Unlock

Mock Test 9

55 Questions • 3 Hours • Full Analytics
Unlock

Special Mock 1

55 Questions • 3 Hours • Full Analytics
Unlock

Free Mock Preview

1 Multiple Select
Consider the following pseudocode function, which takes three non-negative integers
pinit, qinit, np_{\text{init}},\ q_{\text{init}},\ n
as input. ```pseudocode function calculate(p_init, q_init, n) { p = p_init q = q_init for i from 1 to n { if (p > q) { p = p - q q = q + i } else { q = q - p p = p + i } } return p + q } ```` Which of the following statements is/are correct?
A
The function call `calculate(10, 5, 3)` returns
10.10.
B
For any non-negative integers
pinit, qinit, n,p_{\text{init}},\ q_{\text{init}},\ n,
the function calls `calculate(p_init, q_init, n)` and `calculate(q_init, p_init, n)` return the same value.
C
The function call `calculate(7, 7, 2)` returns
12.12.
D
For any non-negative integers
pinitp_{\text{init}}
and
qinit,q_{\text{init}},
the function call `calculate(p_init, q_init, 0)` returns
0.0.
View Solution
Let us check each statement. For `calculate(10, 5, 3)`: * After
i=1,i=1,
(p,q)=(10,5)(5,6).(p,q)=(10,5)\to(5,6).
* After
i=2,i=2,
(p,q)=(5,6)(7,1).(p,q)=(5,6)\to(7,1).
* After
i=3,i=3,
(p,q)=(7,1)(6,4).(p,q)=(7,1)\to(6,4).
Hence the return value is
p+q=6+4=10,p+q=6+4=10,
so statement 1 is true. Now consider one iteration starting from values
aa
and
bb
at step
i.i.
* If
a>b,a>b,
the next pair is
(ab, b+i).(a-b,\ b+i).
* If
ab,a\le b,
the next pair is
(a+i, ba).(a+i,\ b-a).
In either case, the unordered pair of next values is
ab, min(a,b)+i,{|a-b|,\ \min(a,b)+i},
which depends only on the unordered pair
a,b,{a,b},
not on their order. Therefore, if we start with
(pinit,qinit)(p_{\text{init}},q_{\text{init}})
or with
(qinit,pinit),(q_{\text{init}},p_{\text{init}}),
then after every iteration we get the same two values, possibly in different order. Hence the final sum
p+qp+q
is the same in both cases. So statement 2 is true. For `calculate(7, 7, 2)`: * After
i=1,i=1,
(p,q)=(7,7)(8,0).(p,q)=(7,7)\to(8,0).
* After
i=2,i=2,
(p,q)=(8,0)(8,2).(p,q)=(8,0)\to(8,2).
Thus the return value is
p+q=8+2=10,p+q=8+2=10,
not
12.12.
So statement 3 is false. If
n=0,n=0,
the loop does not execute at all, so the function returns
pinit+qinit,p_{\text{init}}+q_{\text{init}},
which is not always
0.0.
Therefore statement 4 is false. Hence the correct statements are:
1 and 2.1 \text{ and } 2.
2 Multiple Select
Consider the function
f:RRf:\mathbb{R}\to\mathbb{R}
defined by
f(x)=xx.f(x)=x|x|.
Which of the following statements is/are true?
A
f(x)f(x)
is continuous at
x=0.x=0.
B
f(x)f(x)
is differentiable at
x=0.x=0.
C
The derivative
f(x)f'(x)
is continuous at
x=0.x=0.
D
The second derivative
f(0)f''(0)
exists.
View Solution
Write
f(x)={x2,x0,x2,x<0.f(x)= \begin{cases}x^2, & x\ge 0,\\ -x^2, & x<0.\end{cases}
First, at
x=0,x=0,
limx0+f(x)=limx0+x2=0,\lim_{x\to 0^+}f(x)=\lim_{x\to 0^+}x^2=0,
and
limx0f(x)=limx0(x2)=0.\lim_{x\to 0^-}f(x)=\lim_{x\to 0^-}(-x^2)=0.
Also,
f(0)=0.f(0)=0.
Hence
ff
is continuous at
x=0,x=0,
so statement 1 is true. Now,
f(0)=limh0f(h)f(0)h.f'(0)=\lim_{h\to 0}\frac{f(h)-f(0)}{h}.
For
h>0,h>0,
f(h)f(0)h=h2h=h0,\frac{f(h)-f(0)}{h}=\frac{h^2}{h}=h\to 0,
and for
h<0,h<0,
f(h)f(0)h=h2h=h0.\frac{f(h)-f(0)}{h}=\frac{-h^2}{h}=-h\to 0.
So
f(0)=0,f'(0)=0,
and statement 2 is true. For
x>0,x>0,
f(x)=2x,f'(x)=2x,
while for
x<0,x<0,
f(x)=2x.f'(x)=-2x.
Thus
f(x)={2x,x>0,0,x=0,2x,x<0,=2x.f'(x)= \begin{cases}2x, & x>0,\\ 0, & x=0,\\ -2x, & x<0,\end{cases} =2|x|.
Since
limx0f(x)=limx02x=0=f(0),\lim_{x\to 0}f'(x)=\lim_{x\to 0}2|x|=0=f'(0),
the derivative
f(x)f'(x)
is continuous at
x=0.x=0.
Hence statement 3 is true. Finally, to check
f(0),f''(0),
compute
f(0)=limh0f(h)f(0)h.f''(0)=\lim_{h\to 0}\frac{f'(h)-f'(0)}{h}.
For
h>0,h>0,
f(h)f(0)h=2h0h=2,\frac{f'(h)-f'(0)}{h}=\frac{2h-0}{h}=2,
while for
h<0,h<0,
f(h)f(0)h=2h0h=2.\frac{f'(h)-f'(0)}{h}=\frac{-2h-0}{h}=-2.
The two one-sided limits are different, so
f(0)f''(0)
does not exist. Therefore statement 4 is false. Hence the correct statements are:
1, 2, 3.1,\ 2,\ 3.
3 Multiple Select
Let
AA
be an
n×nn\times n
matrix with real entries, where
n3n\ge 3
and
det(A)=5.\det(A)=5.
Which of the following statements is/are true?
A
Let
BB
be the matrix obtained from
AA
by multiplying its first row by
22
and its second column by
33
. Then
det(B)=30.\det(B)=30.
B
Let
CC
be the matrix obtained from
AA
by swapping its first and third rows, and then replacing its second column by
C2C22C1.C_2\to C_2-2C_1.
Then
det(C)=5.\det(C)=-5.
C
Let
DD
be the matrix obtained from
AA
by multiplying every entry of
AA
by
1-1
. If
nn
is even, then
det(D)=5.\det(D)=5.
D
Let
EE
be the matrix obtained from
AA
by sequentially applying the row operations
R1R1+R2,R2R2R1.R_1\to R_1+R_2,\qquad R_2\to R_2-R_1.
Then
det(E)=5.\det(E)=5.
View Solution
We use standard determinant properties. For statement 1, multiplying one row by
22
multiplies the determinant by
22
, and multiplying one column by
33
multiplies the determinant by
33
. Therefore
det(B)=23det(A)=65=30.\det(B)=2\cdot 3\cdot \det(A)=6\cdot 5=30.
So statement 1 is true. For statement 2, swapping the first and third rows changes the sign of the determinant, so it becomes
det(A)=5.-\,\det(A)=-5.
Then the column operation
C2C22C1C_2\to C_2-2C_1
does not change the determinant. Hence
det(C)=5.\det(C)=-5.
So statement 2 is true. For statement 3, multiplying every entry of
AA
by
1-1
gives
D=A.D=-A.
Hence
det(D)=det(A)=(1)ndet(A).\det(D)=\det(-A)=(-1)^n\det(A).
If
nn
is even, then
(1)n=1(-1)^n=1
, so
det(D)=det(A)=5.\det(D)=\det(A)=5.
Thus statement 3 is true. For statement 4, each operation of the form
RiRi+kRjR_i\to R_i+kR_j
does not change the determinant. First,
R1R1+R2R_1\to R_1+R_2
does not change the determinant. Then,
R2R2R1R_2\to R_2-R_1
again does not change the determinant, since this is also a row replacement operation. Therefore
det(E)=det(A)=5.\det(E)=\det(A)=5.
So statement 4 is true. Hence the correct statements are:
1, 2, 3, 4.1,\ 2,\ 3,\ 4.
4 Multiple Select
Let
f:ABandg:BCf:A\to B \qquad \text{and} \qquad g:B\to C
be two functions. Let
gf:ACg\circ f:A\to C
be their composition, defined by
(gf)(x)=g(f(x))for all xA.(g\circ f)(x)=g(f(x)) \qquad \text{for all } x\in A.
Which of the following statements is/are necessarily true?
A
If
gfg\circ f
is injective, then
ff
is injective.
B
If
gfg\circ f
is surjective, then
ff
is surjective.
C
If
gfg\circ f
is surjective, then
gg
is surjective.
D
If
gfg\circ f
is injective, then
gg
is injective.
View Solution
We check each statement. For statement 1, suppose
gfg\circ f
is injective. If
f(x1)=f(x2),f(x_1)=f(x_2),
then applying
gg
to both sides gives
g(f(x1))=g(f(x2)),g(f(x_1))=g(f(x_2)),
that is,
(gf)(x1)=(gf)(x2).(g\circ f)(x_1)=(g\circ f)(x_2).
Since
gfg\circ f
is injective, we get
x1=x2.x_1=x_2.
Hence
ff
is injective. So statement 1 is true. For statement 2, this is not necessarily true. Take
A={1},B={a,b},C={c}.A=\{1\}, \qquad B=\{a,b\}, \qquad C=\{c\}.
Define
f(1)=a,f(1)=a,
and define
g:BCg:B\to C
by
g(a)=c,g(b)=c.g(a)=c,\qquad g(b)=c.
Then
gf:ACg\circ f:A\to C
is surjective, since its image is
{c}=C.\{c\}=C.
But
ff
is not surjective onto
B,B,
because
bb
is not in the image of
f.f.
So statement 2 is false. For statement 3, suppose
gfg\circ f
is surjective. Let
cC.c\in C.
Since
gfg\circ f
is surjective, there exists some
aAa\in A
such that
(gf)(a)=c.(g\circ f)(a)=c.
That means
g(f(a))=c.g(f(a))=c.
Now
f(a)B,f(a)\in B,
so we have found an element of
BB
that maps to
cc
under
g.g.
Hence
gg
is surjective. So statement 3 is true. For statement 4, this is not necessarily true. Take
A={1},B={a,b},C={c,d}.A=\{1\}, \qquad B=\{a,b\}, \qquad C=\{c,d\}.
Define
f(1)=a,f(1)=a,
and define
g:BCg:B\to C
by
g(a)=c,g(b)=c.g(a)=c,\qquad g(b)=c.
Then
gg
is not injective, because
g(a)=g(b)butab.g(a)=g(b) \quad \text{but} \quad a\ne b.
However,
gfg\circ f
is injective because its domain
AA
has only one element. So statement 4 is false. Hence the correct statements are:
1, 3.1,\ 3.
5 Multiple Select
Let
f(x)=xxandg(x)=x24f(x)=x|x| \qquad \text{and} \qquad g(x)=|x^2-4|
be two real-valued functions defined on
R.\mathbb{R}.
Which of the following statements is/are true?
A
The function
f(x)f(x)
is differentiable at
x=0.x=0.
B
The function
g(x)g(x)
is continuous but not differentiable at
x=2.x=2.
C
The product function
h(x)=f(x)g(x)h(x)=f(x)g(x)
is not differentiable at
x=2.x=2.
D
The limit
limx2g(x)x2\lim_{x\to 2}\frac{g(x)}{x-2}
exists.
View Solution
We check each statement. First,
f(x)=xx={x2,x0,x2,x<0.f(x)=x|x|= \begin{cases}x^2, & x\ge 0,\\ -x^2, & x<0.\end{cases}
At
x=0,x=0,
limh0+f(h)f(0)h=limh0+h2h=limh0+h=0,\lim_{h\to 0^+}\frac{f(h)-f(0)}{h} =\lim_{h\to 0^+}\frac{h^2}{h} =\lim_{h\to 0^+}h=0,
and
limh0f(h)f(0)h=limh0h2h=limh0(h)=0.\lim_{h\to 0^-}\frac{f(h)-f(0)}{h} =\lim_{h\to 0^-}\frac{-h^2}{h} =\lim_{h\to 0^-}(-h)=0.
Hence
ff
is differentiable at
x=0.x=0.
So statement 1 is true. Now consider
g(x)=x24.g(x)=|x^2-4|.
Since absolute value of a continuous function is continuous,
gg
is continuous everywhere, in particular at
x=2.x=2.
To check differentiability at
x=2,x=2,
note that near
x=2,x=2,
g(x)={x24,x>2,4x2,x<2.g(x)= \begin{cases}x^2-4, & x>2,\\ 4-x^2, & x<2.\end{cases}
So
g+(2)=ddx(x24)x=2=4,g'_+(2)=\left.\frac{d}{dx}(x^2-4)\right|_{x=2}=4,
while
g(2)=ddx(4x2)x=2=4.g'_-(2)=\left.\frac{d}{dx}(4-x^2)\right|_{x=2}=-4.
These are not equal, so
gg
is not differentiable at
x=2.x=2.
Therefore statement 2 is true. Now let
h(x)=f(x)g(x).h(x)=f(x)g(x).
Since
2>0,2>0,
we have
f(x)=x2f(x)=x^2
for all
xx
near
2.2.
Hence near
x=2,x=2,
h(x)=x2x24={x2(x24),x>2,x2(4x2),x<2.h(x)=x^2|x^2-4|= \begin{cases}x^2(x^2-4), & x>2,\\ x^2(4-x^2), & x<2.\end{cases}
Thus
h+(2)=ddx(x44x2)x=2=(4x38x)x=2=16,h'_+(2)=\left.\frac{d}{dx}(x^4-4x^2)\right|_{x=2} =\left.(4x^3-8x)\right|_{x=2} =16,
and
h(2)=ddx(4x2x4)x=2=(8x4x3)x=2=16.h'_-(2)=\left.\frac{d}{dx}(4x^2-x^4)\right|_{x=2} =\left.(8x-4x^3)\right|_{x=2} =-16.
Since these are unequal,
hh
is not differentiable at
x=2.x=2.
So statement 3 is true. Finally,
g(x)x2=x24x2.\frac{g(x)}{x-2} =\frac{|x^2-4|}{x-2}.
For
x>2,x>2,
x24x2=(x2)(x+2)x2=x+24.\frac{|x^2-4|}{x-2} =\frac{(x-2)(x+2)}{x-2}=x+2 \to 4.
For
x<2,x<2,
x24x2=(x2)(x+2)x2=(x+2)4.\frac{|x^2-4|}{x-2} =\frac{-(x-2)(x+2)}{x-2}=-(x+2) \to -4.
The one-sided limits are different, so the limit does not exist. Therefore statement 4 is false. Hence the correct statements are:
1, 2, 3.1,\ 2,\ 3.

Frequently Asked Questions

How many CMI Data Science mock tests are available?

We offer 12 full-length mock tests with 490+ questions, designed to simulate the actual CMI exam experience.

Is the first mock test free?

Yes! Mock Test 1 is completely FREE. You can attempt it with full features including detailed solutions and performance analytics.

Do mock tests have the same pattern as CMI?

Yes, our mock tests follow the exact CMI exam pattern with MCQ, MSQ, and NAT questions, same marking scheme, and 3-hour duration.

Will I get All India Ranking?

Yes! After completing any mock test, you'll see your All India Rank compared to other students who attempted the same test.

More CMIData Science Resources

Why Choose MastersUp?

🎯

AI-Powered Plans

Personalized study schedules based on your exam date and learning pace

📚

15,000+ Questions

Verified questions with detailed solutions from past papers

📊

Smart Analytics

Track your progress with subject-wise performance insights

🔖

Bookmark & Revise

Save important questions for quick revision before exams

Start Your Free Preparation →

No credit card required • Free forever for basic features