537 questions and answers
Write a C program to find both the largest and smallest number in list of integers.
#include <stdio.h> #include <conio.h> void main() { int i,n,small=0,large=0; int a[30]; clrscr(); printf("\n Enter size of the array:"); scanf("%d",&n);
Write a C program to find sum of digit of any no.
#include<stdio.h> #include<conio.h> main() { int n,digit,sum=0; printf("\n enter any number"); scanf("%d",&n);
Write a C program to check a year is leap year or not.
#include <stdio.h> #include <conio.h> main() { int y; printf("\n enter any year"); scanf("%d", &y);
Write a C program to print the following output.
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
#include<stdio.h> #include<conio.h> main() { int n,i,j; printf("\n enter hou meny lines"); scanf("%d",&n);
Write a C program to check a number is even or odd.
#include<stdio.h> #include<conio.h> main() { int n; printf("\n enter any number"); scanf("%d",&n);
Write a C program to manage array operation using switch case.
#include<stdio.h> #include<conio.h> #include<dos.h> void main() { int a[100]={12,45,41,96,32},i,j,m,n,p; clrscr(); printf("\n\n\t*** Proceed according to the instruction ***");
Create a Sparse Matrix in C.
#include<stdio.h> #include<conio.h> #define MAX1 3 #define MAX2 3 struct sparse { int *sp; int row; };
Implement Bubble Sort using C.
#include<stdio.h> #include<conio.h> void main() { int a[100],i,n,j,temp; clrscr(); printf("\n\n\n\t\t ********** BUBBLE SORT **********\n\n\n"); printf("Enter the no of digit to be sorted ...... ");
Write a C program to find the value of Sine(X).
#include<stdio.h> #include<conio.h> #include<math.h> int sine(int); int fact(int); void main() { int x; float result; clrscr();
Write a C program to calculate the following sum:
Sum = 1-x^2/2!+x^4/4!-x^6/6!+x^8/8!-x^10/10!
#include<stdio.h> #include<conio.h> #include<math.h> void main() { int i,n=10,x; long int fact=1; float sum=1; printf(“Enter the x value:”);
Copyright © 2025 MindStudy
A product by Shunya Intelliware Solution
(Registered under MSME Uddyam)