Which of the following assignments are legal in C++?void f(int p[]){ int* q; const int* r; int s[10]; p = q; 1 p = r; 2 p = s; 3 q = p; 4 q = r; 5 q = s; 6 r = p; 7r = q; 8 r = s; 9 s = p; 10 s = q; 11 s = r; 12}
ENGR 121 B Lecture Notes for 10/17/2016 Spencer Kociba ● Quiz on vector operations ● Truth tables ○ Both variables must be true (logical output) X Y xandy 0 0 0 0 1 0 1 0 0 1 1 1 ○ At least one must be true X Y xory 0 0 0 0 1 1 1 0 1 1 1 1 ○ Only 1 is true X Y x+y 0 0 0 0 1 1 1 0 1 1 1 0 ● If/else statements ○ Nested ifelse command ■ If condition 1 ● Action 2 ■ Elseif condition 2 ■ Elseif condition 3 ● Action 3 ■ (etc) ■ Else ● Action final ■ End