█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 800

Problema 0x78 - Suma de 2 números

  • Autor: ramsteven
  • Fecha: 2020-09-19 05:55:40 UTC (Hace más de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
                      main.c:8:10: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
  printf(a+b);
         ^~~
/usr/include/stdio.h:332:43: note: passing argument to parameter '__format' here
extern int printf (const char *__restrict __format, ...);
                                          ^
main.c:8:10: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  printf(a+b);
         ^~~
main.c:8:10: note: treat the string as an argument to avoid this
  printf(a+b);
         ^
         "%s", 
2 warnings generated.

                    
Exited with error status 139
run: line 1:     3 Segmentation fault      (core dumped) ./a.out
0.006 s 1 KBi
#2
Error en tiempo de ejecución (NZEC)
                      main.c:8:10: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
  printf(a+b);
         ^~~
/usr/include/stdio.h:332:43: note: passing argument to parameter '__format' here
extern int printf (const char *__restrict __format, ...);
                                          ^
main.c:8:10: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  printf(a+b);
         ^~~
main.c:8:10: note: treat the string as an argument to avoid this
  printf(a+b);
         ^
         "%s", 
2 warnings generated.

                    
Exited with error status 139
run: line 1:     3 Segmentation fault      (core dumped) ./a.out
0.005 s 1 KBi
#3
Error en tiempo de ejecución (NZEC)
                      main.c:8:10: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
  printf(a+b);
         ^~~
/usr/include/stdio.h:332:43: note: passing argument to parameter '__format' here
extern int printf (const char *__restrict __format, ...);
                                          ^
main.c:8:10: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  printf(a+b);
         ^~~
main.c:8:10: note: treat the string as an argument to avoid this
  printf(a+b);
         ^
         "%s", 
2 warnings generated.

                    
Exited with error status 139
run: line 1:     3 Segmentation fault      (core dumped) ./a.out
0.005 s 1 KBi
#4
Error en tiempo de ejecución (NZEC)
                      main.c:8:10: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
  printf(a+b);
         ^~~
/usr/include/stdio.h:332:43: note: passing argument to parameter '__format' here
extern int printf (const char *__restrict __format, ...);
                                          ^
main.c:8:10: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  printf(a+b);
         ^~~
main.c:8:10: note: treat the string as an argument to avoid this
  printf(a+b);
         ^
         "%s", 
2 warnings generated.

                    
Exited with error status 139
run: line 1:     3 Segmentation fault      (core dumped) ./a.out
0.006 s 1 KBi
#5
Error en tiempo de ejecución (NZEC)
                      main.c:8:10: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
  printf(a+b);
         ^~~
/usr/include/stdio.h:332:43: note: passing argument to parameter '__format' here
extern int printf (const char *__restrict __format, ...);
                                          ^
main.c:8:10: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  printf(a+b);
         ^~~
main.c:8:10: note: treat the string as an argument to avoid this
  printf(a+b);
         ^
         "%s", 
2 warnings generated.

                    
Exited with error status 139
run: line 1:     3 Segmentation fault      (core dumped) ./a.out
0.005 s 1 KBi
Puntos totales: 0 / 100

Código

#include <stdio.h>

int main(void)
{
  int a;
  int b;

  printf(a+b);

  return(0);
}