Category: C Programming

C Programming

sprintf function

sprintf function

sprintf composes a string with the same text that would be printed if format was used on printf, but instead of being printed, the content is stored as a C string in the buffer...

Lvalues and Rvalues

Lvalues and Rvalues

Lvalue : They are generally left values of expression, and are on the left side of the expression. Rvalue : They are generally right values of expression, and are on the right side of...

getting system date in C

getting system date in C

__DATE__ macro is used to print system date in C/C++ language. This macro expands to a string constant that describes the date on which the preprocessor is being run. The string constant contains eleven...

Merging two files in one in C/C++

Merging two files in one in C/C++

We are opening first file firstFile.txt secondly file secondFile.txt and then reading line by line both of these files and writing a line of first file to third file and then contents of first...

clear a char* string array in C

clear a char* string array in C

Example Output Now this doesn’t erase all the characters in the string, but since the first character is now a termination character the string looks empty to your program. If you want to erase...

Integer max value with INT_MAX

Integer max value with INT_MAX

Whenever we have to find maximum and minimum limit of various Data types, we may use INT_MAX platform-dependent constants proposed by ANSI. So INT_MAX find out Constant Maximal value which can be stored in...