2:25 AM
Buenas noches. Estoy haciendo un código en c que no se cual es el error:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE_CHAR(x) x
int main() {
char* s_format;
int mp_exponent=1;
char* out="1034 3203.234000 \"hola\" ";
int len=strlen(out)+1;
char* s_generic="314159265358979\n\0";
char* s_out=(char*)malloc(strlen(s_generic)+len);
strcpy(s_out,out);
s_format=(char*)malloc(SIZE_CHAR(21));
sprintf(s_format,"%%s%%s.%d,%%s ",(int)mp_exponent);
puts(s_format);
printf(
"Cadena original: %s\nEl caracter ultimo vale: %d y penultimo: %d y ante penultimo: %d",
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE_CHAR(x) x
int main() {
char* s_format;
int mp_exponent=1;
char* out="1034 3203.234000 \"hola\" ";
int len=strlen(out)+1;
char* s_generic="314159265358979\n\0";
char* s_out=(char*)malloc(strlen(s_generic)+len);
strcpy(s_out,out);
s_format=(char*)malloc(SIZE_CHAR(21));
sprintf(s_format,"%%s%%s.%d,%%s ",(int)mp_exponent);
puts(s_format);
printf(
"Cadena original: %s\nEl caracter ultimo vale: %d y penultimo: %d y ante penultimo: %d",
« first day (3236 days earlier) ← previous day next day → last day (57 days later) »