Farhan Muhamed has Published 147 Articles

Does C++ support Variable Length Arrays

Farhan Muhamed

Farhan Muhamed

Updated on 27-May-2025 18:10:41

309 Views

No, C++ does not support Variable Length Arrays (VLAs). A Variable length array is an array whose size is determined at runtime, not at compile time. These types of arrays are only supported in C99 version of C language. In this article, we will discuss the reasons why C++ does ... Read More

Converting string to number and vice-versa in C++

Farhan Muhamed

Farhan Muhamed

Updated on 27-May-2025 18:10:07

840 Views

In this article, we will see how to convert a string to a number and a number to string using modern C++ techniques. Understanding Strings and Numbers In C++, strings and numbers are two different data types. A string is a sequence of characters enclosed in double quotes, and ... Read More

How does delete[] “know” the size of the operand array in C++

Farhan Muhamed

Farhan Muhamed

Updated on 27-May-2025 18:09:10

869 Views

The delete[] operator is used to deallocate that memory from heap that was allocated using the new[] operator. In this article, we will explore, what is delete[] operator in C++, how it works, and how it knows the size of the operand array to deallocate the correct amount of memory. ... Read More

Sum of array using pointer arithmetic in C++

Farhan Muhamed

Farhan Muhamed

Updated on 27-May-2025 18:08:05

3K+ Views

The pointers in C++ are used to store memory addresses of variables. We can perform pointer arithmetic such as incrementing or decrementing pointers to traverse through an arrays. In this article, we will learn how to using pointer arithmetic in C++ to traverse through an array and find sum of ... Read More

How do I create a random alpha-numeric string using C++?

Farhan Muhamed

Farhan Muhamed

Updated on 27-May-2025 18:06:52

897 Views

Alpha-numeric string are the strings that containing both alphabets and numbers mixed together. These are generally used in security system for generating passwords or hash keys. In this article, we will learn all the approaches for developing a C++ program to generate random alpha numeric stiring. First of all, let's ... Read More

Difference between \'struct\' and \'typedef struct\' in C++ program?

Farhan Muhamed

Farhan Muhamed

Updated on 26-May-2025 18:20:27

5K+ Views

In C++ program, struct is a keyword used to define a structure, while typedef is a keyword that is used to create an alias for a data type. In this article, we will discuss the difference between struct and typedef struct in C++. Struct in C++ Struct is a ... Read More

Difference between string and char[] types in C++

Farhan Muhamed

Farhan Muhamed

Updated on 26-May-2025 18:18:53

826 Views

In C++, char[] represents a character array, while string is a class in STL to manage text data. Both string and char[] can be used to store and process text data. But, they are different in terms of structure, usage, memory management, and capabilities. In this article, we will discuss ... Read More

Differences between C++ string == and compare()?

Farhan Muhamed

Farhan Muhamed

Updated on 26-May-2025 18:17:37

4K+ Views

In C++ we can compare two strings using compare() function and the == operator. Then the question is why there are two different methods? Is there any difference or not? Yes, there are some basic differences between compare() and == operator. In C++ the == operator is overloaded ... Read More

Why is it faster to process a sorted array than an unsorted array in C++ program?

Farhan Muhamed

Farhan Muhamed

Updated on 26-May-2025 18:16:59

196 Views

In C++, it is faster to process a sorted array than an unsorted array due to some reasons related to algorithm efficiency and data access patterns. In this article, we see why this is the case and how sorting can improve performance of array processing. First of all, let see ... Read More

C++ Program to Perform String Matching Using String Library

Farhan Muhamed

Farhan Muhamed

Updated on 26-May-2025 12:47:32

3K+ Views

The string library provides several functions to manipulate and match strings. In this article, we will see how the various functions of string library functions can be used to match strings in C++. String Matching in C++ String matching is a process of locating one string in another string. ... Read More

Previous 1 ... 7 8 9 10 11 ... 15 Next
Advertisements