#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