Because argv[1]
(for instance) is actually a pointer to the string. So all you’re doing is comparing pointers.
More Related Contents:
- I had issue in below mention program to assign a value to the pointer.String concatenation Program( *s1=*s2) [closed]
- What is the output of the following code in C? [closed]
- pointer to string concept in c [closed]
- C prog. Pointers and strings [closed]
- What does sizeof(&array) return?
- Modifying C string constants? [duplicate]
- Reversing a string in C
- Difference between char *str=”STRING” and char str[] = “STRING”?
- C – Difference between “char var[]” and “char *var”?
- Why doesn’t scanf need an ampersand for strings and also works fine in printf (in C)?
- Literal string initializer for a character array
- Segmentation fault occurring when modifying a string using pointers?
- What is pointer to string in C?
- Incorrect result in c code
- whats the difference between dynamic memory allocation and normal memory allocation?
- When should I use ampersand with scanf()
- Returning string from C function
- How to pass a 2D array by pointer in C?
- Pointer to pointer of structs indexing out of bounds(?) when I try to index anything other than zero
- Addresses of two char pointers to different string literals are same
- Difference between char* and const char*?
- In C, what is the correct syntax for declaring pointers?
- Pointers – Difference between Array and Pointer
- How can I return a character array from a function in C?
- Concatenating strings in C, which method is more efficient?
- C difference between *[] and **
- Does C have any tools for doing string addition?
- What’s the difference between a null pointer and a void pointer?
- Can a pointer ever point to itself?
- Pass by reference in C