how to ascii art in c
#include <stdio.h>
#define MAX_LEN 128
void print_image(FILE *fptr);
int main(void)
{
char *filename = "image.txt";
FILE *fptr = NULL;
if((fptr = fopen(filename,"r")) == NULL)
{
fprintf(stderr,"error opening %s\n",filename);
return 1;
}
print_image(fptr);
fclose(fptr);
return 0;
}
void print_image(FILE *fptr)
{
char read_string[MAX_LEN];
while(fgets(read_string,sizeof(read_string),fptr) != NULL)
printf("%s",read_string);
}
Also in C:
- armstrong number in c
- what is strikethrough in markdown
- Docker error Error response from daemon: conflict: unable to remove repository reference
- how to use malloc in c
- for statement in c
- how to use ? in c
- es fibo
- Declare macro
- fgets in c
- confirm sweet alert
- c interview questions for experienced
- div
- error: ‘cout’ was not declared in this scope
- main function in c
- c math.h sqrt
- strtok
- arm-linux-gnueabihf-gcc: error: unrecognized argument in option '-mfpu=neon-vfpv3'
- create map golang
- Search Code Snippets
- hostbuilder add environment variables
- strncpy c
- set firestore merge
- how to use a pointer as a parameter in c
- print variable c