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

fmod() Function Tutorial In C++

fmod() Function Tutorial In C++

C++ programming language provides the fmod() function in order to calculate the remainder of a division. The fmod() returns the floating-point remainder of number/denom. The fmod() function is provided with the math.h header. fmod() Function Syntax The syntax of the fmod() function is like below. NUMER is the double or floating point numer which mod … Read more

getline() Function Tutorial In C++

getline() Function Tutorial In C++

The C++ provides the getline() function in order to read string input or a line from standard input. The getline() function is provided via the <string> header or library. The getline() function reads provided characters from the standard input until the delimiting character is encountered. The delimiting character is Enter by default. Also, the size … 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

For Loop In C Programming Language

For Loop In C Programming Language

C programming language provides the for loop in order to iterate over a given list. The for loop provides an initialization value with the condition to jump the next step and the incrementation value. The “for” loop can be used in different cases to process multiple data, search for something, etc. In this tutorial, we … Read more