Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
2 answers
96 views

I need some help understanding the difference in behavior with strcat when passing in dynamically allocated char arrays versus char arrays declared with the index operator. The following generates a ...
Lemury's user avatar
  • 23
0 votes
1 answer
114 views

I've been trying to make a function in C that takes a string as the input and then prints out a version of that string that only contains alpha characters. #include <string.h> #include <ctype....
1 vote
1 answer
97 views

Good afternoon everyone! I wrote my implementation of the cat utility in C and ran into some problems. Here's my code: #include <getopt.h> #include <stdio.h> #include <stdlib.h> #...
0 votes
0 answers
29 views

I am trying to read in a text file char by char and append each char to a string. This code here outputs what I expect, showing each individual char: char currentStr[MAX_WORD_LEN] = "&...
tothemax's user avatar
  • 125
-3 votes
1 answer
109 views

I am trying to get 10 random numbers and collect them in a char array to get a random customer ID But it's giving this warning. I couldn't fix it whatever I do. Can you help? char customerid(){ ...
7 votes
2 answers
215 views

I'm trying to write my own strcat function in C++, but it has some problems. My input is two chars c and a, and my function will return a char pointer to a char which c is concatenated with a. For ...
2 votes
2 answers
172 views

The program takes a pointer to a char array and an int. The char array consists of two numbers, separated by a space. The use of the function is to read the values of the char array as integers and ...
1 vote
2 answers
235 views

When running my program: #include <cs50.h> #include <stdio.h> #include <string.h> int main(void) { string word = get_string("Give me a word: " ); int j = strlen(...
Boriscodes's user avatar
0 votes
1 answer
36 views

I tried implementing a Function which opens a obj file and loops over every character in one line starting from the second character, because the first and the second character are just "v " ...
0 votes
2 answers
68 views

I'm trying to make a simple memory for username and phone number so the user could refer back to it at the end of the big chunk of code, but the string stored in name1 seems to be lost when printing ...
1 vote
2 answers
239 views

I am trying to write a program for executing multiple programs from command line arguments. I start with concatenating the argv[x] strings I pass through calling the program into bigger strings that ...
0 votes
0 answers
210 views

Im trying to concatenate two given strings using inline assembly in C using the gcc compiler and intel syntax. I have been successfull to print the first string but not the second and I can't figure ...
0 votes
5 answers
170 views

#include <stdio.h> void strpcat(char *s, char *t) { int i = 0; while (*s++ != '0円') i++; while ((*(s+i) = *t++) != '0円') i++; } int main(void) { char a[20] = &...
0 votes
1 answer
59 views

~~ z_goggamal-input.txt ~~ Make me a sandwich. What? Make it yourself. Sudo make me a sandwich. Okay. this is the original text file. i need to change this file ~~like this ~~ Make me a sosandwich. ...
springbook's user avatar
1 vote
2 answers
87 views

I want to concatenate using strcat each new tag stored in a struct with char member in a the char tags_cell_concat. I get a segfault First attempt #include <stdio.h> #include <string.h> #...

15 30 50 per page
1
2 3 4 5
...
36

AltStyle によって変換されたページ (->オリジナル) /