#c++ mid exam question
int x,y,z;
x=5;
y=5;
z=2;
z+= x%y + x++ + --y - 2;
cout<<"sum="<<z;
write the output ??
int x,y,z;
x=5;
y=5;
z=2;
z+= x%y + x++ + --y - 2;
cout<<"sum="<<z;
write the output ??
FRESHMAN TIPS pinned «#c++ mid exam question int x,y,z; x=5; y=5; z=2; z+= x%y + x++ + --y - 2; cout<<"sum="<<z; write the output ??»
What will be the output of the following code snippet?
void solve() { int a[ ] = {1, 2, 3, 4, 5}; int sum = 0; for(int i = 0; i < 5; i++) { if(i % 2 == 0) { sum += a[i]; } } cout << sum << endl; }
void solve() { int a[ ] = {1, 2, 3, 4, 5}; int sum = 0; for(int i = 0; i < 5; i++) { if(i % 2 == 0) { sum += a[i]; } } cout << sum << endl; }
Anonymous Quiz
17%
5
33%
15
25%
9
25%
6
What will be the output of the following code snippet?
#include <stdio.h> int main() { int a = 3, b = 5; int t = a; a = b; b = t; printf("%d %d", a, b); return 0; }
#include <stdio.h> int main() { int a = 3, b = 5; int t = a; a = b; b = t; printf("%d %d", a, b); return 0; }
Anonymous Quiz
31%
3 5
38%
5 3
19%
33
13%
5 5
👍1
FRESHMAN TIPS
#Mathematics 💠 A=( 2 3 )is inverse of B=( x 3 ) ( 3 4 ) ( 3 y ) Find value of x and y?
✅ Answer
If AB=BA=I I means identity matrix
A is inverse of B and
B is inverse of A
- its inverse of each other
✔ ~ means to indicate inverse
B=A~
First we have to find det(A)
Det(A)=8-9=-1 it's non-singular
Then,
adj.A=(4 -3)
(-3 2)
A~=1/det(A) × adj.A
=-1(4 -3)
(-3 2)
=( -4 3 )
( 3 -2)
B=(-4 3)
(3 -2)
then, x=-4 & y=-2
If AB=BA=I I means identity matrix
A is inverse of B and
B is inverse of A
- its inverse of each other
✔ ~ means to indicate inverse
B=A~
First we have to find det(A)
Det(A)=8-9=-1 it's non-singular
Then,
adj.A=(4 -3)
(-3 2)
A~=1/det(A) × adj.A
=-1(4 -3)
(-3 2)
=( -4 3 )
( 3 -2)
B=(-4 3)
(3 -2)
then, x=-4 & y=-2
👍1
FRESHMAN TIPS
#c++ mid exam question int x,y,z; x=5; y=5; z=2; z+= x%y + x++ + --y - 2; cout<<"sum="<<z; write the output ??
✅Answer
Z+=0+5+4-2 cuz x++ is post
increment
Value of x is 6
✔post increment means after something is done increment will be done.
Z+=7 ,x+=1 means x=x+1
Z=z+7
Z=2+7
Z=9
Z+=0+5+4-2 cuz x++ is post
increment
Value of x is 6
✔post increment means after something is done increment will be done.
Z+=7 ,x+=1 means x=x+1
Z=z+7
Z=2+7
Z=9
📚የ 2015 freshman course first semester
በተለያዩ ግቢዎች ይሄንን ይመሥል ነበረ።
✳️ Addis ababa university
📌Natural science
1General mathematics
2physics
3psychology
4Geography
5Logic
6Commulicative English
7Physical fitness
📌Social Courses
1English
2Civics
3Economics
4Global trends
5Anthropology
6Entrepreneurship
✳️ Bahirdar university
📌for social science
1Emerging technology
2 Economics
3 Global trend
4 Entrepreneurship
5 Social Antropology
5 communicative English skill1
📌For natural
1Physical fit
2mathematics
3English
4Geography
5physics
6psychology
7Logic and critical
✳️Hawassa university
📌natural
1.Logical and critical thinking
2.social Anthropology
3.General physics
4.physical fitness
5.communicative English
6.lntroduction to emerging thechnology
7.Mathimatics for natural
📌 for social
1 english
2 psychology
3 emerging technology
4 economics
5 logic and critical thinking
6 geography of Ethiopian and the horn
✳️ዲላ ዩንቨርሲቲ
📌ናቹራል
1,communicative english
2,general biology
3,general psychology
4,maths for natural
5,logic and critical....
6,physical fitness
7,geograpy of ethiopia and the horn
✳️መቅደል አምባ ዩኒቨርሲቲ
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
✳️ wollega university
📌Natural science
1general biology,
2basic mathematics for natural science
3geography of Ethiopia & the horn,
4critical thinking,
5general psychology and life skills
6 communicative english skill 1
7physical fitness
✳️Wolayita sodo
📌Natural science
1Communicative English 1
2General physics
3General psychology
4Mathematics for natural science
5Logic & critical thinking
6Geography of Ethiopia and the horn
7Physical fitness
✳️DILLA UNIVERSITY
📌Natural science
1COMUNICATIVE ENGLISH SKILL
2GENERAL BIOLOGY
3GENERAL PSYCHOLOGY
4LOGIC&CRITICAL THINKING
5PHYSICAL FITNESS
6MATHS FOR NATURAL SCINCE
7GEOGRAPY
✳️ Debremarkos university
የዚ ደግሞ ይለያል
📌FOR a natural science
1Antrophology
2Civics
3Entrepreneurship
4Psychology
5 G physics
6emerging technology
7Communcative English
8Maths for NS
✅ WOLKITE UNIVERSITY
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
✅jimma University
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
✅AASTU
Applide maths 1
General phy
General chem
Introduction to computing
Physical fitness
Communicative English
✅HARAMAYA UNIVERSITY
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
♻️ Jinka university
🔰Ns
Physics
Mathematics
Psychology
Communicative English
Geography
Critical thinking
Physical fitness
🔰Social science
Geography
Mathematics for social
Economics
Communicative English
Physical fitness
Psychology
Critical thinking
♻️Wachamo
🔰Natural
Psychology
Logic and critical thinking
Geography
C English 1
G physics
Maths
Physical fitness
♻️Mattu University
🔰natural science
1 mathematics
2 physics
3 logic and critical thinking
4 geography
5 physical fitness
6 chemistry
7 english skill 1
🔰 social science
1 psychology
2 english skill 1
3 logic and critical thinking
4 economic
5 geography
6 social anthropology
♻️ Debrebirhan
🔰Social science
1.ecnomics
2.logic
3.maths
4.psychology
5.communicative English skill 1
6.geography
7.physical fitness
Join at and share
👇👇👇👇👇👇
@examanswer1
በተለያዩ ግቢዎች ይሄንን ይመሥል ነበረ።
✳️ Addis ababa university
📌Natural science
1General mathematics
2physics
3psychology
4Geography
5Logic
6Commulicative English
7Physical fitness
📌Social Courses
1English
2Civics
3Economics
4Global trends
5Anthropology
6Entrepreneurship
✳️ Bahirdar university
📌for social science
1Emerging technology
2 Economics
3 Global trend
4 Entrepreneurship
5 Social Antropology
5 communicative English skill1
📌For natural
1Physical fit
2mathematics
3English
4Geography
5physics
6psychology
7Logic and critical
✳️Hawassa university
📌natural
1.Logical and critical thinking
2.social Anthropology
3.General physics
4.physical fitness
5.communicative English
6.lntroduction to emerging thechnology
7.Mathimatics for natural
📌 for social
1 english
2 psychology
3 emerging technology
4 economics
5 logic and critical thinking
6 geography of Ethiopian and the horn
✳️ዲላ ዩንቨርሲቲ
📌ናቹራል
1,communicative english
2,general biology
3,general psychology
4,maths for natural
5,logic and critical....
6,physical fitness
7,geograpy of ethiopia and the horn
✳️መቅደል አምባ ዩኒቨርሲቲ
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
✳️ wollega university
📌Natural science
1general biology,
2basic mathematics for natural science
3geography of Ethiopia & the horn,
4critical thinking,
5general psychology and life skills
6 communicative english skill 1
7physical fitness
✳️Wolayita sodo
📌Natural science
1Communicative English 1
2General physics
3General psychology
4Mathematics for natural science
5Logic & critical thinking
6Geography of Ethiopia and the horn
7Physical fitness
✳️DILLA UNIVERSITY
📌Natural science
1COMUNICATIVE ENGLISH SKILL
2GENERAL BIOLOGY
3GENERAL PSYCHOLOGY
4LOGIC&CRITICAL THINKING
5PHYSICAL FITNESS
6MATHS FOR NATURAL SCINCE
7GEOGRAPY
✳️ Debremarkos university
የዚ ደግሞ ይለያል
📌FOR a natural science
1Antrophology
2Civics
3Entrepreneurship
4Psychology
5 G physics
6emerging technology
7Communcative English
8Maths for NS
✅ WOLKITE UNIVERSITY
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
✅jimma University
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
✅AASTU
Applide maths 1
General phy
General chem
Introduction to computing
Physical fitness
Communicative English
✅HARAMAYA UNIVERSITY
📌 Natural science
1 physics
2 mathematics
3 English
4 geography
5 critical thinking
6 psychology
7 physical fitness
♻️ Jinka university
🔰Ns
Physics
Mathematics
Psychology
Communicative English
Geography
Critical thinking
Physical fitness
🔰Social science
Geography
Mathematics for social
Economics
Communicative English
Physical fitness
Psychology
Critical thinking
♻️Wachamo
🔰Natural
Psychology
Logic and critical thinking
Geography
C English 1
G physics
Maths
Physical fitness
♻️Mattu University
🔰natural science
1 mathematics
2 physics
3 logic and critical thinking
4 geography
5 physical fitness
6 chemistry
7 english skill 1
🔰 social science
1 psychology
2 english skill 1
3 logic and critical thinking
4 economic
5 geography
6 social anthropology
♻️ Debrebirhan
🔰Social science
1.ecnomics
2.logic
3.maths
4.psychology
5.communicative English skill 1
6.geography
7.physical fitness
Join at and share
👇👇👇👇👇👇
@examanswer1
🙏1