Category Archives: Array

Typedef Enum Union Project

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:

 

2d array dynamically with pointer/basics of 2d array

code:

with free:

vid:

 

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

code:

Theory:

 

 

Send Array to Function Using Pointer

code:

 

Relationship Between 1D array and pointer

code:

theory:

Lowercase to Uppercase with array

code:

Another approach:

Another Approach I found on my head:

 

Returning From Array Function in C

As I am learning I didn’t find the solution yet when I was trying to make a reusable code for mydigit extracts code to make it functinal.

So here is the code I tried but it’s not working;

 

Solution can be foound from this link:
http://stackoverflow.com/questions/11656532/returning-an-array-using-c

https://www.tutorialspoint.com/cprogramming/c_return_arrays_from_function.htm

http://stackoverflow.com/questions/14297169/how-to-make-an-array-return-type-from-c-function

http://www-ee.eng.hawaii.edu/~tep/EE160/Book/chap7/section2.1.2.html

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

2d Array Explained Perfectly

Vid:

code:

Another Good Example:

Code:

 

Output:

 

Array Self Input Size

 

integer odd even

problem: (courtesy:101cproblems.com)
Take an array of integer data type of size 5. Scan the values from the user. Now print the output like the following one-
Values in array: 10 25 20 15 30
Sum of odd values: 40
Sum of even values: 60

code:

Array Value Average

Take an array of integer data type of size 5. Scan the values from the user. Now print the average of integers which are greater than 100.

 

 

Find maximum and minimum value in an array

for maximum:

 

for minimum: