I want to print the string of structure what's the problem in my code. How to print the string of structure
Code:
#include<stdio.h> struct profile { char name[10]; int number; }; int main() { struct profile account; account.number = 132; account.name[10] = "Joy"; unsigned int i; for(i =0; i < 10; i++); printf(" name %s \n",account.name[i]); printf(" number %d \n",account.number); return 0; }