WHAT'S NEW?
Loading...

ERROR--> Find Error in Following C Snippet?


#include <stdio.h>

#include <conio.h>

void main()
        {
             int x;
             int x=0;
             int x;
             int x=1;
             int main(){
           printf("%d",x); 
             getch();
          return 0;
          }

Answer -

Error in int x=1. Global variables can have several declarations in C but only one definition and Also Same is True for function Declarations.