11th Computer Science Half yearly exam important five mark question 2022-2023
5 MARK QUESTIONS
Answer the following questions
- Discuss the various generations of computers.
- Find 1’s Complement and 2’s Complement for the following Decimal number (Any Example) a) -98 b) -135
- Explain the types of ROM
- What are the types of Errors?
- What is an entry control loop? Explain any one of the entry controlled loop with suitable example.
- Explain Call by value method with suitable example.
- Explain scope of variable with example.
- What are the advantages of OOPs?
- What are the rules for operator overloading?
- Write the output of the following (Any Example)
#include<iostream>
using namespace std;
class student
{
int rno, marks;
public:
student(int r,int m)
{ cout<<“Constructor “<<endl;
rno=r;
marks=m;
}
void printdet()
{
marks=marks+30;
cout<<“Name: Bharathi”<<endl;
cout<<“Roll no : “<<rno<<“\n”;
cout<<“Marks : “<<marks<<endl;
}
};
int main()
{
student s(14,70);
s.printdet();
cout<< “Back to Main”;
return 0;
}
- Answer the questions based on the following program (Any Example)
#include<iostream>
#include<string.h>
using namespace std;
class comp {
public:
char s[10];
void getstring(char str[10])
{ strcpy(s,str); }
void operator==(comp);
};
void comp::operator==(comp ob)
{ if(strcmp(s,ob.s)==0)
cout<<“\nStrings are Equal”;
else
cout<<“\nStrings are not Equal”; }
int main()
{ comp ob, ob1;
char string1[10], string2[10];
cout<<“Enter First String:”;
cin>>string1;
ob.getstring(string1);
cout<<“\nEnter Second String:”;
cin>>string2;
ob1.getstring(string2);
ob==ob1;
return 0; }
(i) Mention the objects which will have the scope till the end of the program.
(ii) Name the object which gets destroyed in between the program
(iii) Name the operator which is over loaded and write the statement that invokes it.
(iv) Write out the prototype of the overloaded member function
(v) What types of operands are used for the overloaded operator?
(vi) Which constructor will get executed in the above program? Write the output of the program
- Explain the different types of inheritance
- What is piracy? Mention the types of piracy? How can it be prevented?
[pdf-embedder url=”https://csknowledgeopener.com/wp-content/uploads/2022/12/XI-CS-TOP-5-MARK-QUESTION-HALF-YEARLY-EXAM-2022-2023.pdf” title=”XI CS TOP 5 MARK QUESTION HALF YEARLY EXAM 2022-2023″]