prev


Character Arrays:

72.Read char array (12.05.2010)

/*
Program# 72
date : 28-12-2008
Read & Display string
*/

#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