Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
323 views
in Review of C++ Programming by (30.5k points)
closed by

Considering the following C++ statements. Fill up the blanks 

1. lf p=5 and q=3 then q%p is ........ 

2. If E1 is true and E2 is False then E1 && E2 will be ....... 

3. If k=8, ++k <= 8 will be ......... 

4. If x=2 then (10* ++x) % 7 will be ........

5. If t=8 and m=(n=3,t-n), the value of m will be ....... 

6. If i=12 the value i after execution of the expression i+=i– + –i will be .......

1 Answer

+1 vote
by (30.3k points)
selected by
 
Best answer

1. 3 

2. False 

3. False(++k makes k=9. So 9<=8 is false) 

4. 2(++x becomes 3, so 10 * 3 =30%7 =2) 

5. 5( here m=(n=3,8-3)=(n=3,5), so m=5, The maximum value will take) 

6. Here i=12

i + = i– + –i 

here post decrement has more priority than pre decrement. So i — will be evaluated first. Here first uses the value then change so it uses the value 12 and i becomes 11 

i + =12 + –i 

now i =11.

Here the value of i will be changed and used so i– becomes 10

i + = 12 + 10 

= 22

So i = 22 + 10

i = 32

So the result is 32.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...