11th Computer Science Public Exam Important Program Question 2023
11th Computer Science Public Exam Important Program Question 2023
- Hi students we post 11th Computer Science Public Exam Important Program Question 2023.
- This post is helpful for you to attend the programming questions and to get centum in board exams.
- Try to go through the hands on practice questions, and book back programs too.
In C++ programming questions are covered under the topics,
- Array
- Structure
- Constructor
- Class and object
- Inheritance
- Pattern using for loop
- Overloading
- Destructor
Model Programs:
What is the error in the following structure definition.
struct employee{ inteno;charename[20];char dept;}
Employee e1,e2;
Write a program to perform addition of two matrices
C++ program to inputs 10 values and count the number of odd and even numbers
What will be the output of the following C++ program?
#include<iostream>
using namespace std;
int x=45; // Global Variable x
int main()
{
int x = 10; // Local Variable x
cout << “\nValue of global x is ” << ::x;
cout << “\nValue of local x is ” << x;
return 0;
}
Program to calculate the factorial of an integer.
Programs to produce the following design using nested loops
5 4 3 2 1
5 4 3 2
5 4 3
5 4
5
Trace the step-by-step execution of the algorithm for factorial(4).
factorial(n)
— inputs : n is an integer , n ≥ 0
— outputs : f = n!
f, i := 1 ,1
while i ≤ n
f, i := f × i, i+1
Write the output of the following c++ program
#include<iostream>
#include<stdio>
#include <string>
#include<conio>
using namespace std;
struct books {
char name[20], author[20];
} a[2];
int main()
{ cout<< “Details of Book No ” << 1 << “\n”;
cout<< “————————\n”;
cout<< “Book Name :”<<strcpy(a[0].name,”Programming “)<<endl;
cout<< “Book Author :”<<strcpy(a[0].author,”Dromy”)<<endl;
cout<< “\nDetails of Book No ” << 2 << “\n”;
cout<< “————————\n”;
cout<< “Book Name :”<<strcpy(a[1].name,”C++programming” )<<endl;
cout<< “Book Author :”<<strcpy(a[1].author,”BjarneStroustrup “)<<endl;
cout<<“\n\n”;
cout<< “================================================\n”;
cout<< ” S.No\t| Book Name\t|author\n”;
cout<< “====================================================”;
for (int i = 0; i < 2; i++) {
cout<< “\n ” << i + 1 << “\t|” << a[i].name << “\t| ” << a[i].author;
}
cout<< “\n=================================================”;
return 0;
}
Write a C++ program to add two distances using the following structure definition
struct Distance{
int feet;
float inch;
}d1 , d2, sum;
Write the output of the following c++ program
#include <iostream>
#include <string>
using namespace std;
struct student
{
introll_no;
char name[10];
long phone_number;
};
int main(){
student p1 = {1,”Brown”,123443},p2;
p2.roll_no = 2;
strcpy(p2.name ,”Sam”);
p2.phone_number = 1234567822;
cout<< “First Student” <<endl;
cout<< “roll no : ” << p1.roll_no <<endl<< “name : ” << p1.name <<endl;
cout<< “phone no : ” << p1.phone_number <<endl;
cout<< “Second Student” <<endl;
cout<< “roll no : ” << p2.roll_no <<endl<< “name : ” << p2.name <<endl;
cout<< “phone no : ” << p2.phone_number <<endl;
return 0;
}
The pdf is given below. Kindly download and make it useful.
[pdf-embedder url=”https://csknowledgeopener.com/wp-content/uploads/2023/01/XI-CS-EM-PROGRAM-QUESTION-2022-2023.pdf” title=”XI – CS EM PROGRAM QUESTION 2022-2023″]