زبان : C -چگونگی استفاده عناصر ساختمان به عنوان آرماگون تابع
#include
#include
#include
void test(char *);
int main()
{
struct ss{
char name[20] ;
int x ;
} s ;
clrscr();
printf("enter name and stno:");
scanf("%s%d", s.name, &s.x) ;
test(s.name) ;
getch();
return 0;
}
//***********************
void test(char *s)
{
printf("name is:");
while(*s){
printf("%c", *s) ;
s++ ;
}
}
+ نوشته شده در سه شنبه دهم اردیبهشت ۱۳۸۷ ساعت 10:1 توسط behzad lotfi
|