Professional Documents
Culture Documents
Scoring Key Set1 - Prehalf Yearly
Scoring Key Set1 - Prehalf Yearly
Scoring Key Set1 - Prehalf Yearly
{ cout<<\n Enter Sports Code; cin>> S_Code; cout<<\n Sports Name; gets(S_Name); cout<<\n Duration; cin>>Duration; if(strcmp(S_name, Table Tennis)==0) Fees= 2000; else if(strcmp(S_name, Swimming)==0) Fees= 4000; else Fees= 3000; } void Sports::DisplaySports() { cout<<\n Sports Code: <<S_Code<<endl<<Sports Name :<<S_Name<<endl<<Fees : <<Fess<<\n Duration :<<Duration; } d) class Manager : public Director { public: int totalsum; int s; Manager(int a,int b) { num1=a; num2=b; } void sumofnum() { s= num1+num2; } void showsum() { cout<<the sum is<<s; }
3a) void transfer(int a[],int b[],int size)
{ int k=0; for(int i=0;i<size;i++) if(a[i]<0) { b[k]=a[i]; k++; } for(int i=0;i<size;i++) if(a[i]>0) { b[k]=a[i]; k++; } for(int i=0;i<size;i++)
if(a[i]==0) { b[k]=a[i]; k++; } } b)Base address 2660 and Address of A[18][22] is 8640 c) void delqueue() { NODE *temp; If(front==NULL) // If queue is empty { cout<<Queue is empty return; } temp=front; front=front->link; if(front==NULL) //if the queue has only a sing node rear=front=NULL; delete temp; } d) int BsearchAsc(int A[], int n, int data) { int Mid,Lbound=0,Ubound=n-1,Found=0; while((Lbound<=Ubound) && !(Found)) { Mid=(Lbound+Ubound)/2; if(data>A[Mid]) Lbound=Mid+1; else if(data<A[Mid]) Ubound=Mid-1; else Found++; } if(Found) return(Mid+1); //returning 1ocation, if present else return(-1); //returning -1,if not present } e) 1625 4a) Statement 1= File.seekp(-1*sizeof(p), ios::cur); Statement 2= File.write(((char *)&p,sizeof(p)); b)void count_vowels( ) { ifstream fin (first.txt,ios::in); char ch; int count = 0; while(!fin.eof( )) { fin.getch( ); switch(ch) { case a: count++; break; case e: count++; break; case i: count++; break; case o: count++; break; case u: count++; break; } cout<< No:of Vowels = <<count;} fin.close( );} c) void detail()
{ Train tr; fstream fin; fin.open(TRAIN.DAT,ios::in||ios::binary) while(!fin.eof()) { fin.read((char *)&tr,sizeof(tr); if(tr.retdist( )>1000) tr.display( ); } } 5.a) i) S_ID ii) Domain of the column LASTNAME is any string which contain only alphabets (upper or Small case). b.i) select * from employee order by FIRSTNAME asc; ii) select FIRSTNAME ,CITY ,SALARY+BENEFITS Total Salary From employee ,Desig where DESIGNATION =Clerk; iii) select DESIGNATION,min(salary) from desig group by DESIGNATION having DESIGNATION =Clerk OR DESIGNATION =Managers; iv) update DESIG set BENEFITS = BENEFITS +(BENEFITS*.10) d) FIRSTNAME SALARY Sam 75000 Manila 70000 George 75000 e) Degree of EMPLOYEE : 5 Cardinality of DESIG :9 6.a) Refer vol II page no : 653 b) (X+Y+Z). (X+Y+Z). (X+Y+Z). (X+Y+Z). (X+Y+Z) c) c' + yw 7.a.(i) I will use TCP/IP because TCP/IP is a secure and reliable protocol (ii) WAN (iii) Winproxy /Squid proxy server b.Hub/Switch c. Firewall protects our computer system from viruses and other malicious program. It can also used to protect out system from unauthorized access d. Client side scripting language : JAVASCRIPT/VBSCRIPT e. Open Source Software: The Software whose Source code are freely available for modification and re-distribution are called Open Source Softwar. Proprietary software: The Software whose Source code are not available for modification and re-distribution are called Open Proprietary software. f. Internet Message Access Protocol. Protocol for accessing e-mail from local server. g.(i) Mysql, ,Oracle, IBM DB2, MS Sql Server, Postgre SQL, SQLite (ii) OS/w, AS/400, BSD,SPARC Solaris