NIELIT O Level Exam

<p>What will be the output of the following code?</p><pre><span style="font-size: 14px;">int main()<br></span><span style="font-size: 14px;">{<br></span><span style="font-size: 14px;">int i=25;<br></span><span style="font-size: 14px;">int k=i%4;<br></span><span style="font-size: 14px;">print("%d\n",k);<br></span><span style="font-size: 14px;">}</span></pre>

What will be the output of the following code?

int main()
{
int i=25;
int k=i%4;
print("%d\n",k);
}


निम्नलिखित कोड का आउटपुट क्या होगा?

int main()
{
int i=25;
int k=i%4;
print("%d\n",k);
}

A. 1

B. 2

C. 3

D. 4




Correct Answer is :

A. 1



Explanation

% operator is used to find the remainder and when we divide 25 with 4 then it gives the remainder 1

CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad