

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Date: 01/12/ Student Name:……………….. Student ID:…………………..
1- #include
4- int main(){ int v1=2, v2= -1, p1, p2,p3; p1 = & v1; p2= & v2; p2=p1; (1):……… 2 ………….. (2):……… 2 ………….. cout << p2 << endl;//(1) p3=p2; cout<<p3<< endl;//(2) } 5- What should be output of below program if user enter a = 5? int main() { int a; cin>>a; // user can enter any value if (++a5 < = 25) { cout<<"Hello"; ………………………Bye……………………………. } else { cout<<"Bye"; } } II. Write an application with a main method in which you: a) Create a function that read 4 salaries with data fields’ values given by the user. (1Points) Void ReadSalaries (int salary[],int size){ int i; for(i=0;i<size;i++) { cout<<"salary["<<i<<"]="; cin>>salary[i]; } b) Display the salary of every person. (1 Points) Void DisplaySalaries (int salary[],int size){ int i; for(i=0;i<size;i++) {cout<<salary[i]<<" "; }}