Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Blog 

Practice Problem 7

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.12 sec, absolute service time: 0,21 sec 
edit mode |  history  | discussion
Error(s):
source_file.c: In function ‘main’:
source_file.c:18:12: warning: variable ‘B’ set but not used [-Wunused-but-set-variable]
   position B;
            ^
source_file.c:14:12: warning: variable ‘A’ set but not used [-Wunused-but-set-variable]
   position A;
            ^
source_file.c:13:16: warning: unused variable ‘C’ [-Wunused-variable]
         double C;
                ^
source_file.c: At top level:
source_file.c:23:9: warning: data definition has no type or storage class
         C=distance(A,B);
         ^
source_file.c:23:9: warning: type defaults to ‘int’ in declaration of ‘C’ [-Wimplicit-int]
source_file.c:23:20: error: ‘A’ undeclared here (not in a function)
         C=distance(A,B);
                    ^
source_file.c:23:22: error: ‘B’ undeclared here (not in a function)
         C=distance(A,B);
                      ^
source_file.c:24:10: error: expected declaration specifiers or ‘...’ before string constant
   printf("distance=%lf",C);
          ^
source_file.c:24:25: error: expected declaration specifiers or ‘...’ before ‘C’
   printf("distance=%lf",C);
                         ^

        

    
                
stackse - search stackoverflow differently