Skip to content

Commit

Permalink
added string ds in c
Browse files Browse the repository at this point in the history
  • Loading branch information
GauravWalia19 committed Jan 3, 2019
1 parent bf73965 commit ea73609
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
16 changes: 16 additions & 0 deletions C/Data-Structures/STRING/String.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <stdio.h>
#include <string.h>

int main()
{
char str[50];
printf("Enter any string\n");
gets(str);
puts(str);

printf("Length of the string %d",(int)strlen(str));
if(strcmp(str,"Hello World")==0)
{
printf("Strings are equal\n");
}
}
2 changes: 2 additions & 0 deletions C/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#### STRING

* [STRINGS](Data-Structures/STRING/String.c)

#### LISTS

* LINKED LIST
Expand Down
1 change: 1 addition & 0 deletions datastructures.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Indexer for Data Structures Lover
* blog
* docs
* implementation
* [C](C/Data-Structures/STRING/String.c)
* [JAVA](Java/Data-Structures/STRING/Strings.java)
* complexity

Expand Down
4 changes: 2 additions & 2 deletions docs/complexity.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ This page contains the complexities of different algorithms in this repository.
* [HEAPED 3D ARRAY](#dynamic-3d-arrays-(CC++))
* [JAGGED ARRAY](#jagged-array)
* [STRING](#string)
* Strings in C
* [Strings in C]
* [Strings in C++]
* [Strings in JAVA](#strings-in-java)
* Strings in C++
* [LISTS](#lists)
* SINGLE
* [SINGULAR LINKED LIST](#singular-linked-list-having-head-and-next)
Expand Down

0 comments on commit ea73609

Please sign in to comment.