Computerscience
- ‘Open files’ is a system call provided under _________ of operating system. Information management 2
- Operating system is a __________ i) hardware ii) software iii) printer iv) input device software operating system is a software 2
- Write a program to input a month number of the year and display 5he corresponding month of year Code! #include<stdio.h> void main() int choise; printf("n enter the month number: "); scanf("%d",&choise); switch(choise) case 1: printf("Mo... 1
- C++ program to input a word (max. length from user and print each of its characters on new line in Reverse Order #include <iostream> #include <string> using namespace std; int main() { string word; cout << "Enter a word: "; cin >> word; cout << "Reverse... 1
- What does the question actually mean? Left Right I think you were able to understand ! The question ask us to get input from left allignment and output to right allignment Adding... 1
- Write a program in c++ to print the sum of the first 100 natural numbers using for control structure Answer: the program below prints 5050. #include <iostream> using namespace std; int main() int sum = 0; for (int i = 1; i <= 100; i++) sum =... 1
- what is constructor? Give its syntax and two rules to define constructor. In object-oriented programming, a constructor is a special method that is called when an object is created from a class. The purpose of a co... 2
- What is a binary tree? Draw the tree structure for the following expression: E= (a+b)/ [(c*d)-e] Binary tree is a finite set of elements called nodes such that is It may be empty or it is partitioned into three disjoint subsets there is... 1
- The BCD equivalent of a decimal number 88 is ........... Correct option is c) 1000 1000 2
- To write C++ Program using operators // Program to perform given operation on two input integers #include<iostream.h> { void main() { int a, b, c, d, e; char oper; float f; cout... 2
- To study structure of c++ program //following is the simple C++ program . #include<iostream.h> void main() { cout<<"C++ better than C"; } Output:: https://lh3.googleuserconte... 1
- Write an Object Oriented Program in C++, to implement circle class to find area and circumference of a circle using functions void area(), void circum(). #include<iostream> using namespace std; class Circle { public: float radius, area_of_circle,circumference; void getRadius() { cout << "Enter... 1
- Write an Object Oriented Program in C++, to find the GCD of two given numbers. 225 and 45 #include <iostream> using namespace std; int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } int main() { int a = 225, b =... 2
- Write an Object Oriented Program in C++, to implement inventory class to calculate total price of number of items purchased. #include <iostream> using namespace std; class inventory { private: int no_of_items; float total_price; float price; public: void getData(vo... 1
- Write a program in C++, to find factorial of a given number using function void fact (int); #include <iostream> #include <conio.h> using namespace std; void fact(int num); int main(void) int num; cout<<"Enter the number to find fact... 1
- Write a program in C++, to read array of 10 elements and print its sum. #include<iostream> using namespace std; int main() { int arr[10],i,sum=0; cout<<"Enter any elements in Array: "; for(i=0;i<10;i++) { cin>>ar... 1
- Write a program in C++, to print first 15 terms of Fibonacci series Note:: This code only work on turbo c++ #include<iostream.h> #include<conio.h> void main() { int n1,n2,n,i; clrscr(); n1=0; n2=1; cout<<"Fib... 1
- Write a program in C++, to print the sum of first 100 natural numbers using for control structure. #include <iostream> using namespace std; int main() { int i, sum=0; for(i=1;i<=100;i++) { sum=sum+i; } cout<<"Sum of first 100 natural numbe... 1
- Write a program in C++, to find factorial of a given number using for loop. #include <iostream> using namespace std; int main() { int i,fact=1,number; cout<<"Enter any positive Number: "; cin>>number; for(i=1;i<=numb... 1
- Write a program in C++, to find if the given year is leap year or not using if else control structure. #include <iostream> using namespace std; int main() { int year; cout << "Enter a year to check: "; cin >> year; if (year % 4 == 0) { if (yea... 1
- Write a program in C++, to find maximum and minimum of two numbers using conditional operator. #include<iostream> using namespace std; int main() { int num1, num2, max, min; cout<<"Enter two numbers:"; cin>>num1>>num2; max = (num1 > nu... 1
- Write a program in C++, to find max of two numbers using if else control structure. #include<iostream> using namespace std; int main() int num1, num2, max_no; cout<<"Enter the Two Numbers: "; cin>>num1>>num2; if(num1>num2) m... 2
- _____ terminal does no processing on input characters . Correct option is b) Dumb Dumb terminal does no processing on input characters . 1
- WAP in C++ that first initializes an array of given 10- sorted real numbers. The program must verify whether a given Output:: Below code is executed on gdb turbo c++ compiler, it takes 10 input of given number then sort by binary search technique #include<i... 2