Akansha Kumari has Published 54 Articles

When to use C over C++, and C++ over C?

Akansha Kumari

Akansha Kumari

Updated on 11-Jun-2025 18:10:20

1K+ Views

Both C and C++ are powerful programming languages that are used by developers to write both system-level and high-level programs. C language follows procedural programming paradigm with a simple and structured approach, whereas C++ supports both procedural and object-oriented programming. Although both C and C++ are widely used across various ... Read More

How to get the IP Address of local computer using C/C++?

Akansha Kumari

Akansha Kumari

Updated on 11-Jun-2025 18:01:43

10K+ Views

In this article, we will see how to get the Host name and IP address of the local system in an easier way using C and C++ program.  Getting IP Address of Local Computer For this, some standard networking functions are available in socket programming with header files like on ... Read More

fdim() in C++

Akansha Kumari

Akansha Kumari

Updated on 10-Jun-2025 17:23:55

300 Views

C++ fdim() Function The fdim() function returns the positive difference between two floating-point values. For example, if we have two arguments, a and b, respectively, then it will return a-b if a > b, else it will return 0. This function is defined under or header files and supports ... Read More

Type difference of character literals in C and C++

Akansha Kumari

Akansha Kumari

Updated on 10-Jun-2025 17:17:06

761 Views

Character literals are those values, which are assigned to the variable of character data type. It is written as a single character enclosed in single quotes (' ') like 'A', 'b' or '2'. But if we see how these character literals are stored in memory, their type differs. In C ... Read More

Structure Sorting in C++

Akansha Kumari

Akansha Kumari

Updated on 09-Jun-2025 19:27:25

2K+ Views

A structure in C++ is a user-defined data type, which is used to group and store variables of different data types under a single name. In this article we will see how to sort an array of structures using conditions on member variables. For this we will be using the ... Read More

Difference between void main and int main in C/C++

Akansha Kumari

Akansha Kumari

Updated on 09-Jun-2025 15:28:49

39K+ Views

The main() function in C and C++ is anentry point of a program from where the execution begins. And there are two common ways available to define the main function; int main() and void main(). In this following article we will learn the differences between these two in detail. The ... Read More

What are Character Literals in C++?

Akansha Kumari

Akansha Kumari

Updated on 04-Jun-2025 15:33:58

985 Views

In C++, character literals are the constant values, which are assigned to variables of the character data type. These values are represented by a character enclosed within single quotation marks. There are mainly five types of character literals: Narrow-character literals Wide-character ... Read More

What are Boolean Literals in C++?

Akansha Kumari

Akansha Kumari

Updated on 02-Jun-2025 19:36:40

589 Views

Boolean Literals In C++, Boolean literals are the values, which are assigned to variables of the Boolean data type. A Boolean literal represents two values: true or false,  which are internally represented as 1 and 0 respectively. A Boolean literal occupies 1 byte (8 bits) of memory and is used ... Read More

fmax() and fmin() in C++

Akansha Kumari

Akansha Kumari

Updated on 02-Jun-2025 15:18:31

665 Views

The fmax() and fmin() functions in C++ are used to check the maximum or minimum of two floating-point numbers. These functions are defined under the header file of the C++ standard library. C++ fmax() function The fmax() is used to compare and return the larger of two floating-point values. ... Read More

What are the advantages of C++ Programming Language?

Akansha Kumari

Akansha Kumari

Updated on 29-May-2025 19:06:43

4K+ Views

C++ is a general-purpose and high-level programming language, which was created by Bjarne Stroustrup in the early 1980s. It is an extension of the C programming language, which means it has features of C (procedural programming) with the added feature of object-oriented programming. It has become a widely used language, ... Read More

Advertisements