Skip to main content

All Questions

Tagged with
1 vote
2 answers
53 views

Why I cannot access the first read char array after reading a series of others in C?

I wanted to read a phrase and a series of numbers/alphabetic separated by ",". I read the first string then I print it (works fine). I read the first string, read 62 of those series and try ...
Rares Olteanu's user avatar
-1 votes
1 answer
33 views

i think promblem in version of my visual studio, some operator have change, because code i copy from book 2016

#include <stdio.h> #include <string.h> #define SIZE 20 int main(void) { char string1[SIZE]; char string2[] = "string literal"; size_t i; ...
Ksenia's user avatar
  • 11
0 votes
3 answers
117 views

C: Size of array changes scanf

I'm trying to understand, why does the size of array change the output (input is 10 5). If I set char k[1] then it only prints 5, but if I set char k[2] then if prints 10 5. This is my code: #include &...
TCL's user avatar
  • 138
1 vote
2 answers
76 views

i need help because of these constant nulls in C

this is my code and I have been getting constant nulls from it so I do need a help #include<stdio.h> #include<string.h> int main () { char jojo[100]; printf("name:...
Faust's user avatar
  • 19
0 votes
2 answers
2k views

too many arguments in function call in c?

I'm trying to create a menu of colors but the last line reported some error. puts("I don't know about the color %c",input); Here's the declaration char input[7]; And the initialization ...
Steve Wang's user avatar
1 vote
1 answer
78 views

Calling sprintf function

I am using MySQL queries in R to insert data in the databases plus am using also string variables to insert data into the databases. I am getting this error : format not a string literal and no ...
Shallon Kobusinge's user avatar
0 votes
1 answer
103 views

Stripping newline is being very tricky

It looks like scanf() is reading the previous '\n'. I'm trying to get my concatenated string on one line. How do I get rid of the '\n' at the beginning of my second string. This is a c program. I'm ...
NonCreature0714's user avatar