Category "scanf"

how to convert int to void *?

I'm trying to make an analogue of sscanf with a specifier %p. I use this: int res = ahex2num(buf); *va_arg(ap, void **) = (void *) res; It works correctly, i a

Octave - fskipl: invalid stream number

I've got the error message: "Invalid parameter list" from my function, which let Octave open a text file and read it to get input data for my work. function [m

C Programming, scanf() function output [closed]

When I run the program on a Cygwin terminal, I am not able to achieve the following output: 38 $92360.88 llama Notepad++ Cygwin Terminal Progr

Fscanf Doesn't Take Inputs properly

I'm trying to take inputs with fscanf and to give output to another file but fscanf doesn't give the input it should give. Here is my code: #include <stdio.h

Reading multiple lines in C using fscanf

i'm currently doing an uni project which has to read a multiple lines sequence of inputs given in a .txt format. This is my first experience with C, so i don't

how does fscanf works with different variable types?

I was looking at the MSDN documentation for fscanf. I tried changing the sample code in the documentation, but it didn't work as I expected. If, for example, I

warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)’

I am trying to run a simple C program but I am getting this error: warning: format ‘%s’ expects type ‘char *’, but argument 2 has ty

warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)’

I am trying to run a simple C program but I am getting this error: warning: format ‘%s’ expects type ‘char *’, but argument 2 has ty