3 votes 3 votes Output of the following program? #include<stdio.h> struct st { int x; struct st next; }; int main() { struct st temp; temp.x=10; temp.next=temp; printf("%d",temp.next,x); return 0; } Compiler Error $10$ Runtime Error Garbage Value Programming in C nielit2017july-scientistb-it programming-in-c output + – admin asked Mar 30, 2020 edited Oct 29, 2020 by Krithiga2101 admin 1.5k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes COMPILER ERROR , Here compiler doesnt found exact type of next, it behaves like recursion Anilsapkal answered Jun 13, 2021 Anilsapkal comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes struct st next; This should be a pointer to a struct. A Struct object cannot be inside the struct definition. So this compiler error will be detected first. neel19 answered May 11, 2022 neel19 comment Share Follow See all 0 reply Please log in or register to add a comment.