QUIZ
Topic: Increment and Decrement
1. int a=5;
int x=++a + ++a;
cout<<x;
2. int a=5;
int b=6;
Cout<< ++a + b++;
Cout<<b;
3. int x, a, b, c;
a = 2;
b = 4;
c = 5;
x = a--+ b++ -++c;
cout<<x;
4. int x, a;
a = 2;
x = ++a *--a *++a;
cout<<x;
5. int x, a = 4;
x = ++a + ++a + ++a;
cout<<x;
Provide the output of each code snippets and justify your answer with a detailed explanation .
@ProgrammingWithFaith
π4π₯2
C++ Basics pinned Β«QUIZ Topic: Increment and Decrement 1. int a=5; int x=++a + ++a; cout<<x; 2. int a=5; int b=6; Cout<< ++a + b++; Cout<<b; 3. int x, a, b, c; a = 2; b = 4; c = 5; x = a--+ b++ -++c; cout<<x; 4. int x, a; a = 2; x = ++a *--a *++a; cout<<x;β¦Β»
C++ Basics
QUIZ Topic: Increment and Decrement 1. int a=5; int x=++a + ++a; cout<<x; 2. int a=5; int b=6; Cout<< ++a + b++; Cout<<b; 3. int x, a, b, c; a = 2; b = 4; c = 5; x = a--+ b++ -++c; cout<<x; 4. int x, a; a = 2; x = ++a *--a *++a; cout<<x;β¦
Hint:
One variable can't store two value at the same time.
C++ Basics
QUIZ Topic: Increment and Decrement 1. int a=5; int x=++a + ++a; cout<<x; 2. int a=5; int b=6; Cout<< ++a + b++; Cout<<b; 3. int x, a, b, c; a = 2; b = 4; c = 5; x = a--+ b++ -++c; cout<<x; 4. int x, a; a = 2; x = ++a *--a *++a; cout<<x;β¦
1.int a=5;
int x=++a + ++a;
(6+ ++a)
(7+7) coz one variable can't hold two different value , (6 and 7 ) at the same time so it become 7.
7+7=14
Answer 14
2.int a=5;
int b=6;
Cout<<++a +b++// post and pre increment .
6+6 // after this line b will be 7
Cout<<++a +b++; (6+6)
=12
Cout<<b;
=7
answer=12 and 7
3.int x,a,b,c;
a=2;
b=4;
c=5;
x=a-- + b++ - ++c;
(2+4)-6
=6-6=0
cout<<x;
Answer 0
4.int x,a;
a=2
x=++a *--a* ++a
(3*2) * ++a , but one variable can't hold two values at the same time.
So, (2*2)*++a
(4*3)=12
cout<<x;// 12
Answer 12
5.int x,a=4;
x=++a + ++a + ++a;
(++a + ++a) + ++a
(5+6) + ++a but we can't store two value at one variable at the same time.
So,
(6+6)+ ++a
(12)+ 7
Answer 19
int x=++a + ++a;
(6+ ++a)
(7+7) coz one variable can't hold two different value , (6 and 7 ) at the same time so it become 7.
7+7=14
Answer 14
2.int a=5;
int b=6;
Cout<<++a +b++// post and pre increment .
6+6 // after this line b will be 7
Cout<<++a +b++; (6+6)
=12
Cout<<b;
=7
answer=12 and 7
3.int x,a,b,c;
a=2;
b=4;
c=5;
x=a-- + b++ - ++c;
(2+4)-6
=6-6=0
cout<<x;
Answer 0
4.int x,a;
a=2
x=++a *--a* ++a
(3*2) * ++a , but one variable can't hold two values at the same time.
So, (2*2)*++a
(4*3)=12
cout<<x;// 12
Answer 12
5.int x,a=4;
x=++a + ++a + ++a;
(++a + ++a) + ++a
(5+6) + ++a but we can't store two value at one variable at the same time.
So,
(6+6)+ ++a
(12)+ 7
Answer 19
π9β€1
Hey guys, is everything going well? π
We're doing great so far! π But today, I want to hear your thoughts π€ on this channel and the lectures I've been giving. Have they been helpful for you? π And are there any areas that could be improved? π οΈ
Please share your thoughts; your feedback will help me create more awesome content π€© and improve the channel! π
If you have any questions or comments , Dm me.
@ProgrammingWithFaith
We're doing great so far! π But today, I want to hear your thoughts π€ on this channel and the lectures I've been giving. Have they been helpful for you? π And are there any areas that could be improved? π οΈ
Please share your thoughts; your feedback will help me create more awesome content π€© and improve the channel! π
If you have any questions or comments , Dm me.
@ProgrammingWithFaith
π6π5π₯1
Forwarded from ABDUL MAJEED πͺπΉ
Hello, dear students.
πΉ Your midterm exam will be given on paper.
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from ABDUL MAJEED πͺπΉ
Please open Telegram to view this post
VIEW IN TELEGRAM
π4β€2
Hey Guy's LinkedIn account yalachu ena money make maderg metefelgu dm me.
Gn ke 1 year belaye ena 100+ connection lenorachu yegebal.
#LinkedIn
#100legit
@TechnerdGuy
@ProgrammingWithFaith
Gn ke 1 year belaye ena 100+ connection lenorachu yegebal.
#100legit
@TechnerdGuy
@ProgrammingWithFaith
Telegram
βFaithβ
Self Taught Dev | Orthodox βοΈ
π2π1
Zare c++ mid exam yeteftenachu lijoch endet nebr ???
Ena, please photo yanesa sew kale share the photo with us kindly.ππ
@ProgrammingWithFaith
Ena, please photo yanesa sew kale share the photo with us kindly.ππ
@ProgrammingWithFaith
π9
C++ Basics
Zare c++ mid exam yeteftenachu lijoch endet nebr ??? Ena, please photo yanesa sew kale share the photo with us kindly.ππ @ProgrammingWithFaith
???Anyone
Sle examu content negrugn ......?
Sle examu content negrugn ......?
β€4
C++ Mid Exam 2017
Ye section 9 ena 12 mid examachew nw
Geze ende agegnew abren enserawalenπ
@ProgrammingWithFaith
Ye section 9 ena 12 mid examachew nw
Geze ende agegnew abren enserawalenπ
@ProgrammingWithFaith
π₯6π1π1
Updated
Your Emerging Technology mid term exam will cover Chapters 1 up to 3, including the history of Artificial Intelligence.
πWe apologize for any inconvenience caused by the previous announcement.
π₯4
Ke chapter 1 and 2 yalegebachu concept kale negrugn bezi 2 ken wust ketmechgn video arif aderg serlachewalew.....
Plz zm metelu kehone understand ende adergachut aderg alefewalew slezi minem yalegbachu negr kale just ask ,I'll explain it......
#ProgrammingC++ @ProgrammingWithFaith
Plz zm metelu kehone understand ende adergachut aderg alefewalew slezi minem yalegbachu negr kale just ask ,I'll explain it......
#ProgrammingC++ @ProgrammingWithFaith
π5π€£2
C++ Basics
Ke chapter 1 and 2 yalegebachu concept kale negrugn bezi 2 ken wust ketmechgn video arif aderg serlachewalew..... Plz zm metelu kehone understand ende adergachut aderg alefewalew slezi minem yalegbachu negr kale just ask ,I'll explain it...... #ProgrammingC++β¦
Mid exam lalewsedachu temariwoch nw.....?
π4
#For_Freshman_Students
πAcademic calendar for all freshman students has attached in the above photo.
@ProgrammingWithFaith
πAcademic calendar for all freshman students has attached in the above photo.
@ProgrammingWithFaith
π₯3
Programming With Faith
I'm planning a special quiz π§ β just for the holiday season! ππ And guess what? The top 3 people ππ₯π₯π₯ who do the best will score a cool holiday reward! ππ°π
Don't stress! π It's not a hard quiz at all. ππ It's just about basic stuff β π you probably already know! π€π‘
I'll spill the beans π€« about the exact quiz topics later π, once it's all ready! β¨
My main vibe is to make learning π so engaging β¨ and loveable β€οΈ that you actually enjoy it! π₯°
So, stay tuned! ππ Keep an eye out for updates! π’
Programming With Faith! ππ»
@ProgrammingWithFaith
π₯5π2π2β€1π₯°1
Forwarded from Deleted Account
Today, do we have class or only quiz?