Category Archives: C

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:

 

Some string functions

puts()

in c i will implement.
Main job of this function is to print a new line autoamtically where printf() does not give this.

example:

putchar()

The actual work of putchar is it display string as character by character putchar is a macro that outputs character on stdout.

and the basic is : putchar(‘a’)    // it will print a
and putchar(a);     //it will print the value in stored in a
And the basic parameters of this is:
int putchar(int c);

Take input in string:

In string we don’t mention ampersand & sign as string automatically take it as address.

catcpy.c

String equality:

String Lower:

String Upper:

strdup.c

strstr.c

 

 

Reference for some examples:
http://fresh2refresh.com/c-programming/c-strings/

http://www.apiexamples.com/c/string/strstr.html

C program to transpose a matrix

Output:

 

Pattern Printing:Full pyramid in C

 

Output:

 

C problem solution:Anagrams

Anagram:

Output:

 

Pattern Printing:Star and Half pyramid in C

Output

 

Code:

 

Output:

References:

http://www.codeforwin.in/2015/07/star-patterns-program-in-c.html

http://www.tutorial4us.com/cpp-program/cpp-program-print-triangle-of-stars

http://www.programmingsimplified.com/c-program-print-stars-pyramid

Pattern Printing: 5*5 STARS in C

Code:

 

Output:

 

 

A leap year program in C

Enter a year to find out it’s leap year or not !

Explanation about the formula: http://www.infoplease.com/spot/leapyear1.html

 

Some ICPC related programming techniques in c

Sometimes i feel i have to write those in somewhere so i am writing those techniques here which I am learning day by day by reviewing others code….

Here ==1 means TRUE and the program will enter the loop if anything inside the loop will work except zero 0.

Here for(;;) means infinity loop run and everything will work fine except k==0..when zero come program will stop to run

You can also put all of your input in your extended outside text file and load it in the console
by this code