Created
July 28, 2021 13:37
-
-
Save djoudi/a1b6da9ea1f9953515e73a4c2e0f1a13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| int main() | |
| { | |
| // char name[15] = "Ecoin"; // | |
| //char name2[] = "Hi how are you"; | |
| //scanf("please Enter you msg :%s",name); | |
| /* for(int i = 0;i<16;i++){ | |
| if(name[i]=='\0') printf("\nOK is finished.."); | |
| printf("%c",name[i]); | |
| }*/ | |
| // printf("%s",name); | |
| //gets(name); | |
| // printf("\n=======================\n"); | |
| // puts(name); | |
| printf("\n=======================\n"); | |
| // name = "Hi how are you?"; | |
| // strcpy(name,name2); | |
| // puts(name); | |
| // printf("%d",strlen(name)); | |
| //int result = strcmp(name,"Acoin"); | |
| // printf("%d",result); | |
| // TIT | |
| /***Exo 01*****/ | |
| char arr[] = "Welcom To Ecoin"; | |
| char arr2[strlen(arr)+1]; | |
| puts(arr); | |
| printf("\n=======================\n"); | |
| int j = 0; | |
| for(int i = strlen(arr)-1;i>=0;i--) | |
| { | |
| arr2[j++] = arr[i]; | |
| // printf("%c",arr[i]); | |
| } | |
| arr2[strlen(arr)] = '\n'; | |
| printf("\n=======================\n"); | |
| puts(arr2); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment