The exec family of functions replaces the current running process with a new process. It can be used to run a C program by using another C program. It comes under the...
Share
Recursion can be used to do both tasks in one line. Below are one line implementations for stracat() and strcmp().
/* my_strcat(dest, src) copies data of sr...
Share
The math.h header defines various mathematical functions and one macro. All the functions available in this library take double as an argument and return double as th...
Share
The strdup() and strndup() functions are used to duplicate a string.
strdup() :
Syntax : char *strdup(const char *s);
This function returns a pointer to a null-termi...
Share
isalpha(c) is a function in C which can be used to check if passed character is an alphabet or not. It returns a non-zero value if it’s an alphabet else it ret...
Share
With GCC family of C compilers, we can mark some functions to execute before and after main(). So some startup code can be executed before main() starts, and some cle...
Share
Prerequisite : Static variables in C
In C, functions are global by default. The “static” keyword before a function name makes it static. For example, be...
Share
Some programmer thinks that defining a function inside an another function is known as “nested function”. But the reality is that it is not a nested fun...
Share
Macros are pre-processed which means that all the macros would be processed before your program compiles. However, functions are not preprocessed but compiled.
See th...
Share
std::stol(): This function converts the string, provided as an argument in the function call, to long int. It parses str interpreting its content as an integral numb...
Share