Jenny's Coding World - A Ultimate Blog for Computer Tricks, Hacks, Tips, SEO, Softwares for Computer & Mobile.
Showing posts with label C. Show all posts
Showing posts with label C. Show all posts
Monday, 23 April 2012
Sunday, 22 April 2012
C program for compare two string
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int c,flag=0,i;
char a[25],b[25];
clrscr();
printf("Enter first string\n");
gets(a);
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int c,flag=0,i;
char a[25],b[25];
clrscr();
printf("Enter first string\n");
gets(a);
Labels:
C
C program for replace character of string
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
char str[10],och,nch;
clrscr();
printf("Enter a string:");
scanf("%s",str);
flushall();
#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
char str[10],och,nch;
clrscr();
printf("Enter a string:");
scanf("%s",str);
flushall();
Labels:
C
C program for combination of two string
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int i=0,j=0;
char a[25],b[25];
clrscr();
printf("Enter first string\n");
gets(a);
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int i=0,j=0;
char a[25],b[25];
clrscr();
printf("Enter first string\n");
gets(a);
Labels:
C
C program for 2d array replace by zero
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,a[3][3];
clrscr();
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,a[3][3];
clrscr();
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
Labels:
C
C program to find average using array
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a[15],sum=0,i;
float avg;
clrscr();
printf("Enter 20 number:");
for(i=0;i<20;i++)
{
#include<stdio.h>
#include<conio.h>
void main()
{
int a[15],sum=0,i;
float avg;
clrscr();
printf("Enter 20 number:");
for(i=0;i<20;i++)
{
Labels:
C
C program to print following pattern of numbers
1
12
123
1234
12345
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main();
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
12
123
1234
12345
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main();
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
Labels:
C
C program to find you got distiction or not
SOURCE CODE:
include<stdio.h>
#include<conio.h>
void main()
{
float c,e,m,t,p;
clrscr();
printf("enter marks of C.P.U. :");
scanf("%f",&c);
printf("enter marks of E.E.E. :");
scanf("%f",&e);
include<stdio.h>
#include<conio.h>
void main()
{
float c,e,m,t,p;
clrscr();
printf("enter marks of C.P.U. :");
scanf("%f",&c);
printf("enter marks of E.E.E. :");
scanf("%f",&e);
Labels:
C
C program for swap two values without using any other value
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter value for a :");
scanf("%d",&a);
printf("enter value for b :");
scanf("%d",&b);
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter value for a :");
scanf("%d",&a);
printf("enter value for b :");
scanf("%d",&b);
Labels:
C
Tuesday, 27 March 2012
C program to print following pattern of star
*
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main();
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=5;j++)
**
***
****
***** SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main();
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=5;j++)
Labels:
C
C program to Find total numbers which are divided by 7
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
unsigned int i,sum=0,count=0;
clrscr();
printf("\nthey are divided by 7:");
for(i=101;i<=900;i++)
{
#include<stdio.h>
#include<conio.h>
void main()
{
unsigned int i,sum=0,count=0;
clrscr();
printf("\nthey are divided by 7:");
for(i=101;i<=900;i++)
{
Labels:
C
C progrm to Find maximum of three numbers
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter number A:");
scanf("%d",&a);
printf("Enter number B:");
scanf("%d",&b);
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter number A:");
scanf("%d",&a);
printf("Enter number B:");
scanf("%d",&b);
Labels:
C
Sunday, 25 March 2012
C program to Find volume of spehre
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
float pi=3.14,v,r;
clrscr();
printf("enter radius of spehre :");
scanf("%f",&r);
v=(float)4/3*pi*r*r*r;
printf("volume of spehre is %f",v);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
float pi=3.14,v,r;
clrscr();
printf("enter radius of spehre :");
scanf("%f",&r);
v=(float)4/3*pi*r*r*r;
printf("volume of spehre is %f",v);
getch();
}
Labels:
C
C program to Find area and circumferance of circle
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#define pi 3.14
void main()
{
float a,c,r;
clrscr();
printf("enter value of radius :");
scanf("%f",&r);
a=pi*r*r;
#include<stdio.h>
#include<conio.h>
#define pi 3.14
void main()
{
float a,c,r;
clrscr();
printf("enter value of radius :");
scanf("%f",&r);
a=pi*r*r;
Labels:
C
C program for swap two values
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter value for a :");
scanf("%d",&a);
printf("enter value for b :");
scanf("%d",&b);
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter value for a :");
scanf("%d",&a);
printf("enter value for b :");
scanf("%d",&b);
Labels:
C
C program for arithmetic operation between two numbers
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,ans;
clrscr();
printf("enter a number :");
scanf("%d",&a);
printf("enter second number :");
scanf("%d",&b);
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,ans;
clrscr();
printf("enter a number :");
scanf("%d",&a);
printf("enter second number :");
scanf("%d",&b);
Labels:
C
C program to Find temperature in fehrenheit
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
float c,f;
clrscr();
printf("Enter temperature in celsius :");
scanf("%f",&c);
f=(1.8)*c+32;
printf("Temperature in fehrenheit is : %f",f);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
float c,f;
clrscr();
printf("Enter temperature in celsius :");
scanf("%f",&c);
f=(1.8)*c+32;
printf("Temperature in fehrenheit is : %f",f);
getch();
}
Labels:
C
Saturday, 24 March 2012
C program to Find total positive and negative numbers out of less than 100 no using array
SOURCE CODE:
void main()
{
int a[100],p=0,n=0,ne=0,z=0,i;
clrscr();
printf("Enter less than 100 no.");
scanf("%d",&n);
printf("enter diffrent %d no.",n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
void main()
{
int a[100],p=0,n=0,ne=0,z=0,i;
clrscr();
printf("Enter less than 100 no.");
scanf("%d",&n);
printf("enter diffrent %d no.",n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
Labels:
C
C program to Find 3*3 multiplication
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,sum=0,k,a[3][3],b[3][3],c[3][3];
clrscr();
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,sum=0,k,a[3][3],b[3][3],c[3][3];
clrscr();
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
Labels:
C
C program to Find sum and avg of n numbers
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a[15],sum=0,i;
float avg;
clrscr();
printf("Enter n number:");
for(i=0;i<n;i++)
{
#include<stdio.h>
#include<conio.h>
void main()
{
int a[15],sum=0,i;
float avg;
clrscr();
printf("Enter n number:");
for(i=0;i<n;i++)
{
Labels:
C
Subscribe to:
Posts
(
Atom
)