sizeof() In C Programming

How To Compare String In C?

C programming language provides the sizeof() function or operation in order to get the size of the specified variable, array, or object. The sizeof is very popular and used in different ways with different scenarios. The sizeof is very useful to get an object size in order to allocate required memory. sizeof() Syntax The sizeof() … Read more

How To Compare String In C?

How To Compare String In C?

C programming language provides the strcmp() function in order to compare strings. Strings are represented as character or char arrays in C. In this tutorial, we examine how to compare strings in C programming. strcmp() Function Syntax The strcmp() function syntax is like below. STR1 is the first string. STR2 is the second string. If … Read more

strtok() Function In C

strtok() Function In C

C programming language provides the strtok() function in order to break a string into multiple tokens using the specified delimiter. As an example, a command-separated CSV file can be easily parsed with the strtok() function by using the comma as the delimiter. strtok() Function Syntax The syntax of the strtok() function is like below. This … Read more

strcpy() Function In C

strcpy() Function In C

The strcpy() function is used to copy a given string or character array to the specified character array. The strcpy() function copies all provided strings or characters to the destination if the destination has enough memory area. Also, the terminating null character is added and copied to the end of the destination. If the size … Read more

strlen() Function In C Programming

strlen() Function In C Programming

C programming language provides the strlen() function in order to calculate the given string length or character count. The strlen() function takes the string or character array as an argument and returns its length as an integer. The returned type is actually as size_t type which is unsigned integer type . The strlen() is also … Read more

Segmentation Fault (Core Dumped) in C and C++

Segmentation Fault (Core Dumped) in C and C++

Programming languages like C and C++ manage the memory in a more direct way than other programming languages like Java, C#, Python, etc. When an application tries to access the memory area that it does not belong to it Segmentation Fault occurs. Generally, the segmentation fault resulted in the core being dumped which is saving … Read more

pow() Function In C Programming

pow() Function In C Programming

Power is a mathematical function that is used to calculate the power of the specified number. C programming language provides the pow()function which is an implementation of the mathematical power. In this tutorial, we examine how to use the pow() function in order to calculate mathematical power. pow() Function Syntax The pow() function has the … Read more