+ 1
What should be the answer???
Can we create variable of same data type created by the structure in the given code???? https://code.sololearn.com/c0O4bj4Iy1FB/?ref=app
3 Answers
+ 5
Yes. You need to give a name to your struct, then create instances of it.
Could go like this:
#include <stdio.h>
struct S // Name added
{
int x,y;
};
int main() {
struct S bob = {4, 5};
printf("%d, %d", bob.x, bob.y);
return 0;
}
+ 1
No bro I want to say that can I create a variable from the structure without any tag?? If yes then how???
0
Thanks a lot bro(Coder Kitten) 👍👍👍



