Posts

Showing posts from September 29, 2012

PRINT A STRING BY REMOVING THE VOWELS IN THE STRING

Image
LIST OF PROGRAMS#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
void f(char s2[100]);
char s[100];
clrscr();
gets(s);
f(s);
getch();
}
void f(char s2[100])
{
 int i=0,len;
 len=strlen(s2);
 for(i=0;i<len;i++)
 {
 if(s2[i]=='a'||s2[i]=='e'||s2[i]=='i'||s2[i]=='o'||s2[i]=='u')
 continue;
 printf("%c",s2[i]);
 }
}

LIST OF PROGRAMS

SWAPPING TWO NUMBERS USING CALL BY REFERENCE

LIST OF PROGRAMS
#include<stdio.h>
#include<conio.h>
void swap(int *m,int *n);
void main()
{
int x=10,y=20,*m,*n;
m=&x;
n=&y;
clrscr();
printf("%d %d\n",x,y);
swap(m,n);
printf("%d %d",x,y);
getch();
}
void swap(int *m,int *n)
{
int l;
l=*m;
*m=*n;
*n=l;
}

LIST OF PROGRAMS