Control Instructions

Q1: Which of the following statements are correct about the below program?
#include<stdio.h>
int main()
{
    int i = 10, j = 15;
    if(i % 2 = j % 3)
        printf('AptitudeCrack\n');
    return 0;
}

A Error: Expression syntax

B Error: Lvalue required

C Error: Rvalue required

D The Code runs successfully

ANS:A - Error: Expression syntax

if(i % 2 = j % 3) This statement generates 'LValue required error'. There is no variable on the left side of the expression to assign (j % 3).



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.