Category Archives: C

Operator Precedence in C

Sum of series

code:
series: 1/1+1/2+1/3+….+1/N

series: 1/1-1/2+1/3-1/4+1/5….1/N
code:

Series: 1^2/1!+2^2/2!+3^2/3!+4^2/4!+…..+N^2/N!

code:

Series: 1^2/1!+3^2/2!+5^2/5!+….N^2/N!

code:

program to find summation of squares of all numbers  from 5 to 25
series: 25+36+49+…..+625=?

code:

 

 

Palindrome or Not

Code:

 

Find sum of digits of a given number in C

Code:

With While Loop

With for loop:
Check below I didn’t initialized the for loop,

For Loop Another:

 

with do while loop

 

C refresh for logic development

Code:

Output:

How to extract a single digit from a number

Divide a number by 10 will give you a digit as int sample:
256/10=25.6==25
25/10=2.5==2

256%10=6
25%10=5
2%10=2

This video will surely help:

Code:

 

Bitwise Shifting in C

 

XOR in C

Here is the example:

 

Details about Pointer

 

 

 

C Refresh

Palindrome C code

http://dharanyadevi.blogspot.com/2012/04/palindrome-in-c-without-using-string.html

String and Hackerearth

String Upper:

String Lower:

Lower Upper Both:

Hackerearth Problem:: Toggle String

Another Approach:

Another Approach:

 

Helpful Link: http://www.programmingsimplified.com/c/program/c-program-change-case

String Compare in C/C++

http://stackoverflow.com/questions/8004237/how-do-i-properly-compare-strings-in-c

Flags in C

Reference:
https://www.daniweb.com/programming/software-development/threads/201233/use-of-flag-in-c

How to count numbers from string ?

code: