restrict keyword in C
In the C programming language (after the C99 standard), a new keyword is introduced known as restrict....
read more
Why is Conversion From String Constant to ‘char*’ Valid in C but Invalid in C++?
In both C and C++, strings are sequences of characters enclosed in double-quotes. In this article, we will learn why is the conversion from string constant to ‘char*’ valid in C but invalid in C++....
read more
Architecture of 8085 microprocessor
Introduction :...
read more
Difference Between Call by Value and Call by Reference in C
Functions can be invoked in two ways: Call by Value or Call by Reference. These two ways are generally differentiated by the type of values passed to them as parameters....
read more
Difference between constant pointer, pointers to constant, and constant pointers to constants
In this article, we will discuss the differences between constant pointer, pointers to constant & constant pointers to constants. Pointers are the variables that hold the address of some other variables, constants, or functions. There are several ways to qualify pointers using const....
read more
Base Class Pointer Pointing to Derived Class Object in C++
Prerequisite: Pointers in C++...
read more
Why Does C Treat Array Parameters as Pointers?
In C, array parameters are treated as pointers mainly to,...
read more
Find k pairs with smallest sums in two arrays | Set 2
Given two arrays arr1[] and arr2[] sorted in ascending order and an integer K. The task is to find k pairs with the smallest sums such that one element of a pair belongs to arr1[] and another element belongs to arr2[]. The sizes of arrays may be different. Assume all the elements to be distinct in each array. Examples:...
read more
Clockwise/Spiral Rule in C/C++ with Examples
The Spiral/Clockwise Method is a magic tool for C/C++ programmers to define the meaning of syntax declaration in the head within seconds. This method was created by David Anderson and here is a short brief about how to apply this method....
read more
Creating array of pointers in C++
An array of pointers is an array of pointer variables. It is also known as pointer arrays. We will discuss how to create a 1D and 2D array of pointers dynamically. The word dynamic signifies that the memory is allocated during the runtime, and it allocates memory in Heap Section. In a Stack, memory is limited but is depending upon which language/OS is used, the average size is 1MB....
read more
How to declare a 2D array dynamically in C++ using new operator
Prerequisite: Array BasicsIn C/C++, multidimensional arrays in simple words as an array of arrays. Data in multidimensional arrays are stored in tabular form (in row major order). Below is the general form of declaring N-dimensional arrays:...
read more
Reduce the array such that each element appears at most 2 times
Given a sorted array arr of size N, the task is to reduce the array such that each element can appear at most two times....
read more