Sudhir sharma has Published 1218 Articles

Alignof operator in C++

sudhir sharma

sudhir sharma

Updated on 16-Oct-2019 06:51:16

512 Views

Operator is a symbol which is used to indicate the compiler to perform some operation in programming language.alignof operator is the operator that returns the alignment that is to be applied to the given type of variable. The returned value is in bytes.Syntaxvar align = alignof(tpye)Explanationalignof − the operator is ... Read More

Algorithm to generate positive rational numbers in Java

sudhir sharma

sudhir sharma

Updated on 16-Oct-2019 06:47:04

630 Views

Rational Numbers − A number that is expressed in the form of p/q. Given the condition that p and q both should be integers and q should not be equal to 0.Positive rational numbers are those numbers whose final values are positive. For this, either p and q both should ... Read More

Advanced JavaScript Backend Basics

sudhir sharma

sudhir sharma

Updated on 16-Oct-2019 06:36:48

458 Views

JavaScript programming language that is usually used for web scripting. It is a lightweight, interpreted programming language. JavaScript is one of the most programming languages for web development. For running JavaScript each browser has its own engine which enables the proper functioning of JavaScript in the browser. Some common Browsers ... Read More

Virtual Copy Constructor in C++

sudhir sharma

sudhir sharma

Updated on 16-Oct-2019 06:32:23

4K+ Views

Before digging deep into the topics lets brush up all the related terms.A copy constructor is a special type of constructor that is used to create an object that is an exact copy of the object that is passed.A virtual function is a member function that is declared in the ... Read More

C/C++ Pointer Puzzle?

sudhir sharma

sudhir sharma

Updated on 07-Oct-2019 08:19:16

263 Views

A Pointer is a variable that stores the address of another variable. The data type of the pointer is the same as the data type as the variable.In this puzzle you need to know the size of the pointer that is being used. The puzzle checks our understanding of pointers ... Read More

C/C++ Function Call Puzzle?

sudhir sharma

sudhir sharma

Updated on 07-Oct-2019 08:14:43

134 Views

This C/C++ function call puzzle is a puzzle that is intended to explore more about the behaviour of method calling in both the programming languages C and C++/.The output of a method in C and C++ is different. Lets see what is the difference in calling methods in C and ... Read More

C++ Boolean Matrix

sudhir sharma

sudhir sharma

Updated on 07-Oct-2019 08:12:21

666 Views

Boolean matrix is a matrix that has only two elements 0 and 1. For this boolean Matrix question, we have a boolean matrix arr[m][n] of size mXn. And the condition to solve is, if m[i][j] = 1 then m[i] = 1 and m[j] = 1 which means all elements of ... Read More

C++ Adam Number

sudhir sharma

sudhir sharma

Updated on 07-Oct-2019 08:06:37

2K+ Views

Adam Number is a number whose square is reverse of the square of its reverse.Concept Explained − For a number to be adam number, the square of number is reverse of the square of the reverse of the number. Let’s take an example, 12 is the number. Square of 12 ... Read More

C++ program to Adding elements of an array until every element becomes greater than or equal to k

sudhir sharma

sudhir sharma

Updated on 07-Oct-2019 07:36:17

106 Views

We have array of unsorted element i.e. arr[] and have an integer K, and we have to find the minimum number of steps needed in which the elements of the array will be added to make all the elements greater than or equal to K. We can add two elements ... Read More

C program to check if a given string is Keyword or not?

sudhir sharma

sudhir sharma

Updated on 07-Oct-2019 07:28:38

10K+ Views

Keyword is a predefined or reserved word which is available in C++ library with a fixed meaning and used to perform an internal operation. C++ Language supports more than 64 keywords.Every Keyword exists in lower case letters like auto, break, case, const, continue, int etc.32 Keywords in C++ Language which ... Read More

Advertisements