Programming useful codes
Posted by
Unknown
at
23:30
on Saturday, 13 April 2013
/* Find absolute value */
#include<stdio.h>
int abs(int number){
if(number & 65536)
return (~number+1);
return number;
}
void main(){
printf("%d",abs(5)); // can pass any input,,
}
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Popular Posts
(no title)
/* Check is number even or odd*/ #include<stdio.h> void main(){ int a; printf("Enter the value : "); scanf("%d...
(no title)
/* Find absolute value */ #include<stdio.h> int abs(int number){ if(number & 65536) return (~number+1); return number; ...
(no title)
/* Remove white space with sign */ #include<stdio.h> void remove_white_space(char *source) { // including first sign(+/-) if ex...
(no title)
/* Logic of toLowerCase() in c language */ #include<stdio.h> void toUpperCase(char *source){ int index=0; while(source[...
(no title)
/* Logic of toUpperCase() in c language */ #include<stdio.h> void toUpperCase(char *source){ int index=0; while(source[...
(no title)
/* parseint() c version */ #include<stdio.h> void remove_white_space(char *source) { // including first sign(+/-) if exist in...
(no title)
/* Count number of 1 bits */ #include<stdio.h> int counter(int data){ int count=0; int loop_counter=1; int test=1; while(...
Subscribe To
Posts
Atom
Posts
Comments
Atom
Comments
Labels
1 bits counter
(1)
bitwise operator
(6)
btiwise operator
(1)
c language
(7)
check even or odd number
(1)
java parseInt() function implemenation in c language programme
(1)
programme to find absolute value
(1)
programme to remove whitespace and first '+' or '-' sign
(1)
toLowerCase() program
(1)
toUpperCase() in c language
(1)
Blog Archive
▼
2013
(7)
▼
April
(7)
/* Count number of 1 bits */ #include<stdio.h> ...
/* Logic of toLowerCase() in c language */ #...
/* Logic of toUpperCase() in c language */ #...
/* Remove white space with sign */ #include<st...
/* parseint() c version */ #include<stdio.h> ...
/* Find absolute value */ #include<stdio.h> int...
/* Check is number even or odd*/ #include<stdio...
About Me
Unknown
View my complete profile
Powered by
Blogger
.
0 comments:
Post a Comment