fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x = 3;
  5. int * ptr;
  6. ptr = &x; //store address of x in pointer
  7. *ptr = 8; // change the x by 8
  8. printf("the value of x is : %d\Ŷ͞ , xͿ;
  9. printf("the value of x is : %d\Ŷ͞ , *ptr);
  10. printf("the address of x is : %d\Ŷ͞ , &xͿ;
  11. printf("the address of x is : %d\Ŷ͞ , ptr);
  12. printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr)); // your code goes here
  13. return 0;
  14. }
  15.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:8:9: warning: missing terminating " character
  printf("the value of x is : %d\Ŷ͞ , xͿ;
         ^
prog.c:8:9: error: missing terminating " character
  printf("the value of x is : %d\Ŷ͞ , xͿ;
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:9:9: warning: missing terminating " character
  printf("the value of x is : %d\Ŷ͞ , *ptr);
         ^
prog.c:9:9: error: missing terminating " character
  printf("the value of x is : %d\Ŷ͞ , *ptr);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:10:9: warning: missing terminating " character
  printf("the address of x is : %d\Ŷ͞ , &xͿ;
         ^
prog.c:10:9: error: missing terminating " character
  printf("the address of x is : %d\Ŷ͞ , &xͿ;
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:11:9: warning: missing terminating " character
  printf("the address of x is : %d\Ŷ͞ , ptr);
         ^
prog.c:11:9: error: missing terminating " character
  printf("the address of x is : %d\Ŷ͞ , ptr);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:12:8: error: stray ‘\315’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
        ^
prog.c:12:9: error: stray ‘\276’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
         ^
prog.c:12:10: error: stray ‘\315’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
          ^
prog.c:12:11: error: stray ‘\236’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
           ^
prog.c:12:12: error: expected ‘)’ before ‘size’
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
            ^~~~
prog.c:12:23: error: stray ‘\305’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                       ^
prog.c:12:24: error: stray ‘\266’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                        ^
prog.c:12:37: error: stray ‘\’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                                     ^
prog.c:12:38: error: stray ‘\305’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                                      ^
prog.c:12:39: error: stray ‘\266’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                                       ^
prog.c:12:40: error: stray ‘\315’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                                        ^
prog.c:12:41: error: stray ‘\236’ in program
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                                         ^
prog.c:12:2: warning: passing argument 1 of ‘printf’ from incompatible pointer type [-Wincompatible-pointer-types]
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
  ^~~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘int (*)(const char * restrict)’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
prog.c:12:57: error: expected ‘)’ before ‘;’ token
  printf;͞size of poiŶter ptr : %d\Ŷ͞ , sizeof(ptr));  // your code goes here
                                                         ^
prog.c:11:2: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
  printf("the address of x is : %d\Ŷ͞ , ptr);
  ^~~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘int’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
prog.c:14:1: error: expected ‘)’ before ‘}’ token
 }
 ^
prog.c:10:2: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
  printf("the address of x is : %d\Ŷ͞ , &xͿ;
  ^~~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘int’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
prog.c:14:1: error: expected ‘)’ before ‘}’ token
 }
 ^
prog.c:9:2: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
  printf("the value of x is : %d\Ŷ͞ , *ptr);
  ^~~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘int’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
prog.c:14:1: error: expected ‘;’ before ‘}’ token
 }
 ^
stdout
Standard output is empty