Questions tagged [string]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
2k views

Checking the base address of pointer string

#include <stdio.h> #include <string.h> int main(void) { char *a="World"; char *b; printf("a=%p\n",&a); // Base address of a b=a; // Base address of a ...
0
votes
1answer
132 views

pset1 credit: segmentation error

My approach is to take the user input in as a string, while forcing numeric input between 14 and 16 characters long. I think my code should do that, but I get a segmentation fault for numeric inputs ...
0
votes
2answers
22 views

Problem in C programming about condition

Well, I am learning C programming.Today I faced a problem while coding. I have made a string variable named,"answer". But when I wrote a condition, I found an error message but I don't know ...
0
votes
1answer
186 views

check function in speller pset5, not quite understanding the apostrophe

I am working on the check() function of dictionary.c. I am using it to test cat.txt: A cat is not a caterpillar. It says everything is correctly spelled except "not" When I check the hashtable ...
0
votes
2answers
422 views

different between pointers and pointer to arrays?

difference between -- char a[SIZE]; //Char array of size (SIZE) char *a; //character pointer. Points towards a char (a). char *a[SIZE]; // Array of pointer characters. char *(a[SIZE]); // Pointer ...