prev


Character Arrays:

76.Read char by char (12.05.2010)

/*
Program# 76
date : 28-12-2008
Read a string & Display -char by char until $
*/

#include <stdio.h>
main(){
char a[100];
int i;

i=0;
scanf("%c",&a[i]);
while(a[i]!='$'){
i++;
scanf("%c",&a[i]);
}
a[i]='\0';

i=0;
while(a[i]!='\0'){
printf("%c",a[i]);
i++;
}

}



next
blog comments powered by Disqus