Trending ▼   ResFinder  

CBSE Class 12 Pre Board 2020 : Computer Science - Prelim 1 (Delhi Public School (DPS), Jammu)

3 pages, 15 questions, 0 questions with responses, 0 total responses,    0    0
CBSE 12 Pre Boards
  
+Fave Message
 Home > cbse12_pre_boards >   F Also featured on: School Page cbse12

Formatting page ...

DELHI PUBLIC SCHOOL JAMMU ASSIGNMENT FOR PRE-BOARD-I(2019-2020) Class: XII Subject: Computer Science(283) Q1. Write the type of C++ Operators (Arithmetic, Logical, and Relational Operators) from thefollowing: (i) !(ii) !=(iii) &&(iv) % Q2. Observe the following program very carefully and write the name of those header file(s), which are essentially needed to compile and execute thefollowing program successfully: void main() { char text[20], newText[20]; gets(text); strcpy(newText,text); for(inti=0;i<strlen(text);i++) if(text[i] = = A ) text[i] = text[i]+2; puts(text); } Q3. Find and write the output of the following C++ program code: typedef char STRING[80]; void MIXNOW(STRING S) { int Size=strlen(S); for(int I=0;I<Size;I+=2) { char WS=S[I]; S[I]=S[I+1]; S[I+1]=WS; } for (I=1;I<Size;I+=2) if (S[I]>= M && S[I]<= U ) S[I]= @ ; } void main() { STRING Word= CBSEEXAM2019 ; MIXNOW(Word); cout<<Word<<endl; } Q4. What is a copy constructor? Illustrate with a suitable C++ example. Q5. Write the output of the following C++ code. Also, write the name of feature of Object Oriented Programming used in the following program jointly illustrated by the Function 1 to Function 4. voidMy_fun ( ) // Function 1 { for (int I=1 ; I<=50 ; I++) cout<< "-" ; cout<<end1 ; } voidMy_fun (int N) // Function 2 { for (int I=1 ; I<=N ; I++) cout<<"*" ; cout<<end1 ; } voidMy_fun (int A, int B) // Function 3 { for (int I=1. ;I<=B ;I++) cout<<A*I ; cout<<end1 ; } voidMy_fun (char T, int N) // Function 4 { for (int I=1 ; I<=N ; I++) cout<<T ; cout<<end1; } void main ( ) { int X=7, Y=4, Z=3; char C='#' ; My_fun (C,Y) ; My_fun (X,Z) ; } Q6. Define a class Ele_Bill in C++ with the following descriptions: Private members: Cname of type character array Pnumber of type long No_of_units of type integer Amount of type float. Calc_Amount( ) This member function should calculate the amount as No_of_units*Cost . Amount can be calculated according to the following conditions: No_of_units Cost First 50 units Free Next 100 units 0.80 @ unit Next 200 units 1.00 @ unit Remaining units 1.20 @ unit Public members: * A function Accept( ) which allows user to enter Cname, Pnumber, No_of_units and invoke function Calc_Amount(). * A function Display( ) to display the values of all the data members on the screen. Q.7 Write a user-defined function AddEnd4(int A[][4],intR,int C) in C++ to find and display the sum of all the values, which are ending with 4 (i.e., unit place is 4). 19 5 4 Q8. Write a user defined function in C++ to find the sum of both left and right diagonal elements from a two dimensional array. Q9. An array S[10] [30] is stored in the memory along the column with each of its element occupying 2 bytes. Find out the memory location of S[5][10], if element S[2][15] is stored at the location 8200. Q10. Write a function RevText() to read a text file Input.txt and Print only word starting with I in reverse order . Example: If value in text file is: INDIA IS MY COUNTRY Output will be: AIDNI SI MY COUNTRY Q11.Write a function in C++ to search and display details, whose destination is Cochin from binary file Bus.Dat . Assuming the binary file is containing the objects of the following class: class BUS { intBno; // Bus Number char From[20]; // Bus Starting Point char To[20]; // Bus Destination public: char * StartFrom ( ); { return From; } char * EndTo( ); { return To; } void input() { cin>>Bno>>; gets(From); get(To); } void show( ) { cout<<Bno<< : <<From << : <<To<<endl; } }; Q12. Write a function in C++ to add more new objects at the bottom of a binary file "STUDENT.dat", assuming the binary file is containing the objects of the following class : class STU { intRno; charSname[20]; public: void Enter() { cin>>Rno;gets(Sname); } void show() { count<<Rno<<sname<<endl; } }; Q13. State any one Distributive Law of Boolean Algebra and Verify it using truth table. Q14. Draw the Logic Circuit of the following Boolean Expression: ((U + V ).(U + W)). (V + W ) Q15. Reduce the following Boolean Expression to its simplest form using K-Map: F(X,Y,Z,W)= (0,1,2,3,4,5,8,10,11,14)

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : cbse pre boards, prelims 2015 - 2016, preliminary examinations, central board of secondary education, india schools, free question paper with answers, twelfth standard, xiith std, board exams, mock, model, sample, specimen, past, free guess papers.india, delhi, outside delhi, foreign, cbse class xii, cbse 12, 12th standard, cbse papers, cbse sample papers, cbse books, portal for cbse india, cbse question bank, cbse question papers with answers, pre board exam papers, cbse model test papers, solved board question papers of cbse last year, previous years solved question papers, free online cbse solved question paper, cbse syllabus, india cbse board sample questions papers, last 10 years cbse questions papers, cbse important questions, specimen / mock papers.  

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

cbse12_pre_boards chat