This set of MCQ(multiple choice questions) focuses on the Problem Solving Through Programming In C NPTEL Week 3 Solutions.
Course layout (Answers Link)
Answers COMING SOON! Kindly Wait!
Week 0 : Assignment
Week 1 :Â Introduction to Problem Solving through programs
Week 2 :Â Arithmetic expressions, Relational Operations, Logical expressions; Introduction to Conditional Branching
Week 3 :Â Conditional Branching and Iterative Loops
Programming Assignment
Week 4 :Â Arranging things : Arrays
Programming Assignment
Week 5 :Â 2-D arrays, Character Arrays and StringsÂ
Programming Assignment
Week 6 :Â Basic Algorithms including Numerical Algorithms
Week 7 :Â Functions and Parameter Passing by Value
Week 8 :Â Passing Arrays to Functions, Call by Reference
Programming Assignment
Week 9 :Â Recursion
Week 10 :Â Structures and Pointers
Week 11 :Â Self-Referential Structures and Introduction to Lists
Week 12 :Â Advanced Topics
NOTE: You can check your answer immediately by clicking show answer button. Problem Solving Through Programming In C NPTEL Week 3 assignment answers” contains 10 questions.
Now, start attempting the quiz.
Problem Solving Through Programming In C NPTEL Week 3 assignment answers
Q1. Which of the following statement is correct?
a) Operator precedence determines which operator is performed first in an expression with more than one operator with different precedence. Associativity is used when two operators of same precedence appear in an expression.
b) Operator associativity determines which operator is performed first in an expression with more than one operator with different associativity. Precedence is used when two operators of same precedence appear in an expression.
c) Operator precedence and assocativity are same.
d) None of the above
Answer: a)
Q2. Find the output of the following C code.
a) 67
b) -36
c) 66
d) -37
Answer: a)
Q3. What is the output of the following C code?
a) 0
b) 3
c) 4
d) Compilation error
Answer: c)
Q4. Find the output of the following C code.
a) IITKGP
b) IITD and IITM
c) IITKGP and IITM
d) IITM
Answer:
Q5. What will be the output?
a) Condition is true
b) Condition is false
c) Error
d) No output possible
Answer: a)
Q6. What is the output of the following program?
a) Programming on C 0
b) NPTEL 0
c) NPTEL 3
d) Compilation error
Answer: b)
Q7. What is the output of the C program given below
a) true
b) false
c) Compiler dependent
d) Compiler error
Answer: b)
Q8. What will be the output?
a) 0
b) 1
c) 10
d) 30
Answer: b)
Q9. What will be the output?
a) TRUE
b) FALSE
c) Syntax Error
d) Compilation Error
Answer: b)
Q10. What is the output of the following C code?
a) 10
b) 11
c) 20
d) Compiler error
Answer: c)
Problem Solving Through Programming In C NPTEL Week 3 assignment answers
Q1. What should be the value of ‘b’ such that the output of the program will be 20?
a) 1
b) 2
c) 3
d) 4
Answer: b) 2
Q2. Find the output of the following C code
a) IITKGP
b) IITD and IITM
c) IITKGP and IITM
d) IITM
Answer: a) IITKGP
Q3. What is the output of the following program?
a) Programming on C 0
b) NPTEL 0
c) NPTEL 3
d) Compilation error
Answer: b) NPTEL 0
Q4. Find the output of the following C code
a) -42
b) 24
c) 15
d) -34
Answer: c) 15
Q5. Which of the following statement is correct?
a) Operator precedence determines which operator is performed first in an expression with more than one operator with different precedence. Associativity is used when two operators of same precedence appear in an expression
b) Operator associativity determines which operator is performed first in an expression with more than one operator with different associativity. Precedence is used when two operators of same precedence appear in an expression
c) Operator precedence and associativity are same.
d) None of the above
Answer: a)
Q6. What is the output of the C program given below?
a) true
b) false
c) Compiler dependent
d) Compiler error
Answer: b) false
Q7. What is the output of the following program?
a) Value of c and d are 1 and 3 respectively
b) Value of c and d are 1 and 3.333333 respectively
c) Value of c and d are 1.000000 and 3.000000 respectively
d) Value of c and d are 1 and 3.000000 respectively
Answer: d) Value of c and d are 1 and 3.000000 respectively
Q8. What will be the output?
a) TRUE
b) FALSE
c) Syntax Error
d) Compilation Error
Answer: a) TRUE
Q9. What will be the output?
a) 0
b) 1
c) 7
d) Compilation error
Answer: a) 0
Q10. The precedence of arithmetic operators is (from highest to lowest)
a) %, *, /, +, –
b) %, +, /, *, –
c) +, -, %, *, /
d) %, +, -, *, /
Answer: a) %, *, /, +, –
Problem Solving Through Programming In C NPTEL Week 3 assignment answers
Q1. Find the output of the following C program
a) 120, 120
b) 120, 130
c) 130, 120
d)130, 130
Answer: b) 120, 130
Q2. What will be the output of the following program?
a) 1
b) 0
c) -1
d) 2
Answer: a) 1
Q3. Find the output of the following C code.
a) x1=4, x2=3
b) x1=-5, x2=-4
c) x1=2.5, x2=4.2
d) Roots are imaginary
Answer: d) Roots are imaginary
Q4. Find the output of the following code.
a) 6
b) 4
c) 10
d) 14
Answer: c) 10
Q5. Which of the following statements are correct?
I. The ‘else’ block is executed when condition inside ‘if’ statement is false.
II. One ‘if’ statement can have multiple ‘else’ statement.
a) Only I
b) Only II
c) Both I and II
d) None of the above is correct
Answer: a) Only I
Q6. C modulo division operator ‘%’ can be applied on
a) only float variables
b) only int variables
c) int and float combination
d) any data types in C
Answer: b) only int variables
Q7. The output of the following program will be
a) C programming
b) Java
Python
c) C programming
Java
d) Compilation error
Answer: b) Java
Python
Q8. What will be the output?
a) 2
b) 8
c) 10
d) 12
Answer: c) 10
Q9. What will be the output?
a) Right
b) Wrong
c) 0
d) No output
Answer: a) Right
Q10. What will be the output of the program?
a) The answer will be 15
b) The answer will be 0
c) The answer will be 1
d) Compilation error
Answer: b) The answer will be 0
Previous Course – Week 3 assignment answers
Q1. Which of the following statements is correct?
a) Operator precedence determines which operator is performed first in an expression with more than one operator with different precedence. Associativity is used when two operators of same precedence appear in an expression
b) Operator associativity determines which operator is performed first in an expression with more than one operator with different associativity. Precedence is used when two operators of same precedence appear in an expression
c) Operator precedence and associativity are same.
d) None of the above
Answer: a)
Q2. What is the output of the following program?
#include<stdio.h>
int main()
{
int x=11, y=5, z;
float w;
z=x%y;
w=x/y;
printf("Value of z and w are %d and %f respectively", z, w);
return 0;
}
a) Value of z and w are 1 and 2 respectively
b) Value of z and w are 1 and 2.200000 respectively
c) Value of z and w are 1.000000 and 2.200000 respectively
d) Value of z and w are 1 and 2.000000 respectively
Answer: d)
Q3. What will be the output?
#include<stdio.h>
int main()
{
int a=4, b=15, c=29;
if(c>b>a)
printf("TRUE");
else
printf("FALSE");
return 0;
}
a) TRUE
b) FALSE
c) Syntax Error
d) Compilation Error
Answer: b)
Q4. What will be the output of following program?
#include<stdio.h>
int main()
{
int x=(10 || 0) && (10);
printf("x=%d", x);
}
a) x=60
b) x=70
c) x=0
d) x=1
Answer: d) x=1
Q5. What will be the output?
#include<stdio.h>
int main()
{
int x=17, y=1;
if(!(!x) && y)
printf("%d", x);
else
printf("%d", y);
return 0;
}
a) 17
b) 18
c) 1
d) 0
Answer: a) 17
Q6. What is the output of the following C code?
#include<stdio.h>
int main()
{
int x=7, y=3, z=5;
printf("%d\n", x-x/y*y%z);
return 0;
}
a) 7
b) 6
c) 5
d) 0
Answer: b) 6
Q7. What will be the output?
#include<stdio.h>
int main()
{
int x;
x = (11+3)%5/2;
printf("%d\n", x);
return 0;
}
a) 0
b) 1
c) 2
d) Compilation error
Answer: c) 2
Q8. Find the output of the following C code
#include<stdio.h>
int main()
{
int a=3, b=2;
a=a=b=0
printf("%d, %d", a,b);
return 0;
}
a) 1,2
b) 0,0
c) 3,2
d) 1,0
Answer: a) 1,2
Q9. The output of the following program will be
#include<stdio.h>
int main()
{
int a=0, b=1, c=-1;
if(a)
printf("IITKGP\n");
if(b)
printf("IITM \n");
if(c)
printf("IITR \n");
return 0;
}
a) IITKGP
b) IITMIITR
c) IITM
IITR
d) IITKGP
IITR
Answer: c)
Q10. What is the output of this C code?
#include<stdio.h>
int main()
{
int x = 10;
if(x>0)
printf("inside if\n");
else if(x>0)
printf("inside elseif\n");
return 0;
}
a) inside if
b) inside elseif
c) inside if
inside elseif
d) compile time error
Answer: a) inside if
<< Prev – An Introduction to Programming Through C Week 2 Assignment Solutions
>> Next- An Introduction to Programming Through C Week 4 Assignment Solutions
DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.
Programming in Java NPTEL week 1 quiz answers
NPTEL – Python for Data Science assignment solutions
Nptel – Deep Learning assignment solutions
For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.
Wher is the week 3 problem solving through programming in c programming assignment code can u plz upload for me
Now, all programming answers for week 3 has been uploaded.
Go through this link