Prerequisite: C signal handling, IPC through shared memory A signal is used in the UNIX system to notify a process that a particular event has… Read More
Category Archives: C++
I had a phone interview, then an onsite interview at Intel in Folsom, California, for the position of Graphics Software Engineer. They mostly asked questions… Read More
After a long thirst for parallelizing highly regular loops in matrix-oriented numerical programming, OpenMP was introduced by OpenMP Architecture Review Board (ARB) on 1997. In… Read More
Given a straight line which passes through a given point (x0, y0) such that this point bisects the line segment in two equal line segments.… Read More
Given an array arr[] of N integers, the task is to find the maximum difference between any two elements of the array.Examples: Input: arr[] =… Read More
Given a string str consisting of lowercase English alphabets, the task is to count the number of adjacent pairs of vowels.Examples: Input: str = “abaebio” Output:… Read More
The below section deals about overload resolution as it helps in the fundamentals of overloading and overriding. Predict the output: CPP #include <iostream> using namespace… Read More
Given a number N which is the total number of nodes in a complete binary tree where nodes are number from 1 to N sequentially… Read More
Given a binary array, the task is to count the number of 1’s and 0’s in this array using STL in C++. Examples: Input: arr[]… Read More
Given an array, the task is to find elements which are odd and even, using STL in C++ Examples: Input: a[] = {1, 2, 3,… Read More
Given an array and an integer N, find elements which are divisible by N, using STL in C++ Examples: Input: a[] = {1, 2, 3,… Read More
Given an array, the task is to print or display all the reverse permutations of this array using STL in C++. Reverse permutation means, for… Read More
Generics is the idea to allow type (Integer, String, … etc and user-defined types) to be a parameter to methods, classes and interfaces. For example,… Read More
Given an array arr[] of N elements and a positive integer K. The task is to find the longest sub-sequence in the array having LCM… Read More