Write a Menu driven Program which include these operations like Creating an array, insertion, deletion and fetching all the elements from an array?
create a class student which store name roll no. age of the student. Derive a class test from student class which store marks of 5 subjects input and display the details of student
program to display, name ,contact, national card number, and the conversional summary
Write a Program in C++ to enter the record of 100 Students using structure pointer as a function parameter.
Fields for structures are: “std_name”, “std_id”, “std_roll_no”, “std__gpa” & “std_award”;
apply a check such that those students having gpa greater or equal to 3.5 so that these students will get Rs. 10,000/- per semester as a scholarship amount
Find the output of the following program. Find errors if any and correct it.
class test
{ int x;
public:
test(int x)
{x=x; }
void display()
{cout<<x;}
};
int main()
{ test T1(5);
T1.display();
return 0;
}
[Assume the necessary header files and namespaces included]
Consider the code snippet given below:-
[Assume the necessary header files and namespaces included]
int main()
{ int a[10];
cout<<”enter the elements of the array\n”;
for(int i=0;i<10;i++)
cin>>a[i];
return 0;
}
Complete the code such that the even and odd numbers from the array ‘a’ are stored into two different arrays. The size of these arrays should be same as that of the number of elements and their memory should be deallocated after displaying the odd and even numbers.
The following program has a bug when the user enters more than one name on the first
prompt. Execute the program by entering more than one string on the first prompt, observe
and state what is the bug on the program as a block comment, then modify the program to
fix the bug.
1 #include <iostream>
2 using namespace std;
3
4
5 int main(){
6
7 string name, surname;
8
9 cout<<"Please enter your name: ";
10 cin>>name;
11 cout<<"Please enter surname: ";
12 cin>>surname;
13 cout<<"Hi, "<<name<<" "<<surname<<endl;
14
15 return 0;
16 }