Question: I am getting this error on this C program In function main: notes.c:36: warning: passing argument 2 of getline from incompatible pointer type /usr/include/stdio.h:673: note:
I am getting this error on this C program
In function main:
notes.c:36: warning: passing argument 2 of getline from incompatible pointer type
/usr/include/stdio.h:673: note: expected size_t * __restrict__ but argument is of type int *
#include
void convert(char *s1, char *s2) { int i=0; for(i=0; i
int main(void) { int size = 1000; // to read the line char *line; // to store encoded text char output[1000]; printf("Enter the text that you want to encode: "); // read the user input getline(&line, &size, stdin); convert(line, output); printf(" The encoded text is: "); printf("%s", output); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
