Tag Archives: C

CPP04 – (c) Write a CPP program to generate a Fibonacci series of 50 numbers .

(c) Write a CPP program to generate a Fibonacci series of 50 numbers . CODE:- #include<iostream.h> #include<conio.h> void main() { unsigned long T,i,X=0,Y=1; clrscr(); cout<<“\nFIBONACCI 50 SERIES ARE :- \n”; i=0; while(i<50) { T=X+Y; cout<<” “<<X; X=Y; Y=T; i++; } getch(); } SCREEN SHOTS:- OUTPUT:-  

CPP03 – Write a CPP program to find the maximum marks, average-marks and minimum marks obtained by a study in five papers given

Write a CPP program to find the maximum marks, average-marks and minimum marks obtained by a study in five papers as given below: Paper 1            Paper 2            Paper 3            Paper 4            Paper 5 Marks              50                    70                    65                    80                    56 CODE:- #include<iostream.h> #include<conio.h> void main() { int… Read More »

CPP02 – Write a CPP program to explain the use of for loop, while loop, switch-case, break and continue statements.

CPP02 – Write a C++ program to explain the use of for loop, while loop, switch-case, break and continue statements. CODE:- #include<iostream.h> #include<conio.h> void main() { int i; clrscr(); cout<<“FOR LOOP”<<endl; for(i=1;i<6;i++) cout<<i<<endl; cout<<“WHILE LOOP”<<endl; while(i>1) cout<<–i<<endl; cout<<“DO WHILE LOOP”<<endl; do { cout<<i++<<endl; }while(i<6); getch(); } SCREEN SHOTS:- OUTPUT:-   CODE:- #include<iostream.h> #include<conio.h> void main()… Read More »

CPP01- Write a CPP program to find size and print the all basic data types of C++.

Write a CPP program to find size and print the all basic data types of C++. CODE:- #include<iostream.h> #include<conio.h> void main() { char c=’c’; int i=123; short s=12; long l=98775345; float f=456.789; double d=12345.6789; clrscr(); cout << “Value of char   : ” << c << endl; cout << “Value of int    : ” << i… Read More »

Write an interactive C program to append the contents of a file at the end of another file without using any built-in functions – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18 Program: #include<stdio.h> #include<stdlib.h> void main() { FILE *fp1,*fp2,*ftemp; char CH; int c; clrscr();… Read More »

Write an interactive C program to calculate the sum of array element using pointer – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18 Program: #include<stdio.h> void main() { int ARRAY[]={1,2,3,4,5,6,7,8,9,0}; int I,*PTR,SUM=0; clrscr(); PTR=&ARRAY; while(*PTR) {… Read More »

Write a C program to determine a given matrix is a sparse matrix – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18 Program: #include<stdio.h> void main() { int MATRIX[10][10]; int I,J,M,N; int COUNT=0; clrscr(); printf(“ENTER… Read More »

Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18  Program: #include<stdio.h> int LARGE=-1; void main() { int NUM[10],I; void largest_rec(int *); clrscr();… Read More »

Why C is called a middle level language? Give a flowchart to explain the program execution process. Explain each step in detail. 10m Jun 2010

Why C is called a middle level language? Give a flowchart to explain the program execution process. Explain each step in detail. 10   C is called a middle level language It is actually binding the gap between a machine-level language and high-level language. User can use C language to do System Programming (For writing… Read More »

List and explain bitwise operators in ‘C’. 10m jun2009

List and explain bitwise operators in ‘C’. 10m The following table lists the Bitwise operators supported by C. Assume variable ‘A’ holds 60 and variable ‘B’ holds 13, then – Operator Description Example & Binary AND Operator copies a bit to the result if it exists in both operands. (A & B) = 12 i.e.,… Read More »