The tmpnam() function is a special function which is declared inside “stdio.h” header file. It generates a different temporary file name each time it is...
Share
The C library function isgraph() checks whether a character is a graphic character or not.
Characters that have graphical representation are known are graphic charac...
Share
strftime() is a function in C which is used to format date and time. It comes under the header file time.h, which also contains a structure named struct tm which is u...
Share
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
Let us consider the below program.
#include<stdio.h>
void swap(char *str1, char *str2)
{
  char *temp = str1;
  str1 = str2; ...
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
The strspn() function returns the length of the initial substring of the string pointed to by str1 that is made up of only those character contained in the string poi...
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