prev


Character Arrays:

73.Read char array (12.05.2010)

/*
Program# 73
date : 28-12-2008
Read a string until dot
*/

#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