Code In Tech - The Ultimate World of Computer Technology

Monday, 23 April 2012

C Program to Display the Equivalent Memory Addresses for the given values using Array

SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
 int a[10],i,*p;
 clrscr();
 printf("\nEnter 10 Nombers:");

 for(i=0;i<10;i++)
  {
   scanf("%d",&a[i]);

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);

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();

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);

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++)
  {

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++)
 {

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++)
  {
  

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);

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);