C Strut and Pointer

1.What is Strut in C? -Struct in C is used to visualize the object with attributes. -For example, we can have the object “dog” with attributes as name, breed, age, color. Then, we should declare the dog in struct type as: struct dog { char… Read More

C Pointer Explanation

A.Understand of Operations 1. Operation & -The operation & to get the memory location value of a variable. The location where a variable is stored. -The operation $ can use for both pointer and non-pointer variables For example: int a=5; printf(“a is located at $%x.\n”,… Read More

C/C++ Common Function

1.Copy a String to another String char strOne[1024]; strcpy(strOne,argv[1]);//Copy parameter at index 1 to string strOne 2.Split a String with a Delimiter and take the first part char strOne[1024]; strOne= strtok(“test.txt”, “.”);//The strOne will be “test” 3.Concat Two String char strOne[1024]; strOne = strcat(“test”, “.bak”);//The… Read More