Category Archives: String

Another Good Example of Struct using Function and Pointer

code:

 

Using function with Struct user defined type also pointer

code:

why we used *sp in one place and sp in another place ?there s a reason behind this
*sp means address is passing where after the local input takeup it will go but if not use  dereferencing then it will not go outside. So to write we need with address.

and in sp it is read only. so to print sp is enough to show.

vid:

Array of String

theortecical concept source:
http://stackoverflow.com/questions/20347170/char-array-and-char-array

code:

Problem:
source: 101cproblems:

Problem 80: Array of String

Take an array of string named fruitNames and store four fruit names (“Mango”, “Jack-fruit”, “Banana”, “Litchi”). Now iterate the array using loop and print the names of the fruits each in a separate line.

code:

 

Char Pointer Practical Example Using String Input and String/Char Variable Passing

code:

Theory:

 

 

Lowercase to Uppercase with array

code:

Another approach:

Another Approach I found on my head:

 

Extract Digits From a Number and Make a Sum of all the digits and show this in C

Code is here:

Output:

Modular Beautiful Code: 😀

Actually array return function is not directly possible in C and I am finding the solution here.

Took Slightly Help From this link:
https://cboard.cprogramming.com/c-programming/150996-extracting-digits-integer.html

http://mathforum.org/library/drmath/view/56002.html

strcmp() explained perfectly

code: