prev


Character Arrays:

75.Read until $ (12.05.2010)

/*
Program# 75
date : 28-12-2008
Read a string 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';
printf("\n%s",a);
}



next
blog comments powered by Disqus