저는 c programming
을 처음 사용합니다. 내가 입력 한 문자위한 프로그램을 작성하고 마지막으로 입력 한 문자를 표시 ..하지만 항상에만 마지막 문자를 표시했다 .. 나는 그것의 간단한 질문을 알고 있지만 초보자 그래서 사람을 도와주세요입니다 .. .. 도와주세요c로 입력 한 문자를 표시하는 방법은 무엇입니까?
#include<stdio.h>
int main()
{
char z;
int a;
printf("enter the no.");
scanf("%d",&a);
printf("the entered no. is:%d\n",a);
int i;
for(i=0;i<a;i++)
{
printf("enter the letters:");
scanf("%s",&z);
}
printf("the entered letters are:");
for(i=0;i<a;i++)
{
printf("%s\n",&z);
}
return 0;
}
감사합니다의 aishwarya의 KARTHIK를 대답을 얻었다! –