forked from pclubuiet/Hacktoberfest-2k17
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #263 from Z0Marlin/revstr
Reverse String
- Loading branch information
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include<stdio.h> | ||
int main(){ | ||
int a,b; | ||
scanf("%d%d",&a,&b); | ||
printf("a|b = %d\na&b = %d\na<<b = %d\na>>b = %d\n~a = %d\n",a|b,a&b,a<<b,a>>b,~a); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Name: Aditya Jain | ||
GitHub Username: Z0Marlin | ||
Degree and Year: 1st Year, B. Tech | ||
Department: Information Technology | ||
|
||
Interests: Anime and Hacking ;) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print("Hello World!") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include<stdio.h> | ||
#include<string.h> | ||
int main(){ | ||
char a[50],t; | ||
int i,n; | ||
printf("Input String : "); | ||
n=(scanf("%[^\n]%*c",a),strlen(a)); | ||
for(i=0;i<n/2;i++){ | ||
t=a[i]; | ||
a[i]=a[n-1-i]; | ||
a[n-1-i]=t; | ||
} | ||
printf("%s\n",a); | ||
} |