Skip to content

mo7amed-hussein/useful-solved-problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is set of useful c small functions many of them were asked in c related interviews

It contain the following functions

- flipSequence : print flip flop sequence like 22,3,22,3,22,3,22,3,.... and so on
- getFibonaci : generate nth a fibonaci sequence 
- printFibionaci : print n fibonaci sequence
- getPower : calcuate power on number ,regarding negative exponent
- echoReverse : print characters in reverse order after new line '\n'
- dec2bin : convert decimal to binary
- swapXor : swap two numbers using xor
- swapAS : swap two numbers using addition and subtraction
- swapTemp : swap two numbers using temporary variable
- printArr : print content of an array of int
- reverseArr : reverse content of an array of int
- getMin : get minimum value in an array of int
- getMax : get maximum value in an array of int
- drawTri1 : draw triangle in console like right arrow head
- drawTri2 : draw triangle in console like up arrow head
- printArrWR : print content of an array of int without repeat [1,1,2,3,2,2,3,4] => [1,2,3,4]
- fact : calculate factorial of number
- isArrMirrored : check if array is mirrored or not
- countOnes : count ones in binary representation of decimal number
- little2big : convert little indian to big indian 0xffaabbcc => 0xccbbaaff 

finally

I would also gladly welcome your questions and contributions.

you are welcome to contact me at

[email protected]

Have fun!

Mohamed Hussein.

About

This is set of useful c small functions many of them were asked in c related interviews

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages