Download as pdf
Download as pdf
You are on page 1of 3
Academic Year: 2012-1013 Course Level: 1% Lecturer Name: Dr. K, AUlanabi Exam Date: / 6/2013 Duration: 2 hours University of Kuta College of Math and CS CS Department Course Name: Advanced C++ Course Code . ‘Eiaminatiop Paper Final Exam (1 Ro eg? (Bmarks 1. Write down avtggnptate fugeéi®n to find the average of x[n]? And then, use this function to Tind the average of y[10] as integers and z[20] as doubles. 2. Write down a C++ program to find 5 y= x41)! iI Q4: Given the following book structure diagram (2 marks) Employee 85) |X” id Name Address Job Salary aa ml Gigall Ryall a City Street# House# Basic Tax Net AGB Ay yall CSI gi Write down the complete C++ to construct the structure. Create an array of 10 Employees, and enter the required information, Find and print the Net salary for all employees? cyl quan! st 3 gil gy a» 4, Find and prin the numberof employees wit job"Programmers”? osmosed ae ably Se 5, Add 100 to the Basi salaries forall employees with City ="Najat"? eae J ce cay yin gu oat gh Vo ch 6. Find and print the overall Net salaries using a function? AD ay ap ua Jae sis pa SE C.-C pith ia eA Ball Gare esis pal sessing! ett AS 29 ON er = 3 Academic Year: 2012-1013 Course Level: I* Lecturer Name: Dr. K. AUJanabi Exam Date: /642083. Duration: 2 hiss University of Kufa College of Math and CS CS Department Course Name: Aggie Course Code void main() {int x{6]={20,18,120,-50,60,40}; int *ptr; ptr=8-x[0]; *ptr=100; +tptr; *ptr=8; *(ptrt2)-2; pir; *ptr=100; fort int i=0;i<6;i++) cout< ‘(G.marks) int fl(int af], int n) {int m1=afn-1]; for(int r=n-2;1>=0;r~) | if(om1>afr]) ml=alr]; return ml;} void £2(int af), int n) { for(int r=0;r include #include int main() {char x[J="Republic of Iraq-2013"; ‘char y{50].2[50]=""; int b=strlen(x);_ inti; cou

You might also like