error
struct1.c: In function ‘main’:
struct1.c:7: error: expected expression before ‘{’ token
struct1.c:8: error: expected expression before ‘{’ token
the code is
#include<stdio.h>
main(){
struct point{
int x;
int y;
} x,y;
x={1,2};
y={3,4};
printf(" %d %d %d %d\n",x.x,x.y,y.x,y.y);
}
how do i initialize the variables x and y if i don't want to initialize them where i have defined them?


Sign In
Create Account


Back to top









