geeksforgeeks
search icon
  • Courses
    Sale
  • Tutorials
  • Practice
  • Jobs
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
Output of C++ Program | Set 7Predict the output of following C++ programs. Question 1CPP class Test1 { int y;};class Test2 { int x; Test1 t1;public: operator Test1() { return t1... Read More
C++CPP-Output
Check if a number is multiple of 5 without using / and % operatorsGiven a positive number n, write a function isMultipleof5(int n) that returns true if n is multiple of 5, otherwise false. You are not allowed to use % and / operators.Met... Read More
MathematicalDSA
Object Oriented Programming | Set 1Following questions have been asked in GATE CS exam. 1. It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique i... Read More
GATE
Default Constructors in C++A default constructor is a special constructor in C++ that is used for object initialization when no arguments are provided during creation. It ensures that objects are pr... Read More
C++
Print a given matrix in spiral formYou are given a rectangular matrix mat[][] of size n x m, and your task is to return an array while traversing the matrix in spiral form.Examples: Input: mat[][] = [[1,   ... Read More
MatrixDSAArraysBasic Coding ProblemsMicrosoftAmazonMorgan StanleyOracleD-E-ShawSnapdealPaytmAccoliteZohoNagarroMAQ SoftwareBrowserStackMakeMyTripnearbuyAmazon-QuestionSnapdeal-Questionspiralpattern-printingArrays
Missing and Repeating in an ArrayGiven an unsorted array arr[] of size n, containing elements from the range 1 to n, it is known that one number in this range is missing, and another number occurs twice i... Read More
SearchingDSAArraysAmazonSamsungMAQ SoftwareBitwise-XORArrayslimited-range-elements
Check if a Binary Tree is subtree of another Binary TreeGiven the roots of two binary trees, root1 and root2, determine whether the tree rooted at root2 is a subtree of the tree rooted at root1. Return true if there exists a no... Read More
TreeDSAMicrosoftAmazonAdobeMorgan StanleySAP LabsMakeMyTripOYOCavisson System
Are Array Members Deeply Copied?In C++, we can assign a struct (or class) variable to another variable of same type. All members of one variable are copied to the other variable. But what happens when th... Read More
C LanguagepointerC Array and String
When do we use Initializer List in C++?Initializer List is used in initializing the data members of a class. The list of members to be initialized is indicated with constructor as a comma-separated list followe... Read More
C++
Output of C++ Program | Set 6Predict the output of below C++ programs.Question 1C #includeiostreamusing namespace std;class Test { int value;public: Test (int v = 0) {value = v;} i... Read More
C++CPP-Output
Output of C++ Program | Set 5Difficulty Level: RookiePredict the output of below C++ programs.Question 1C++ #includeiostreamusing namespace std;class Test { int value;public: Test(int... Read More
C++CPP-Output
When are Constructors Called?When are the constructors called for different types of objects like global, local, static local, dynamic?1) Global objects: For a global object, constructor is called bef... Read More
C++
Decision Trees - Fake (Counterfeit) Coin Puzzle (12 Coin Puzzle)Let us solve the classic "fake coin" puzzle using decision trees. There are the two different variants of the puzzle given below. I am providing description of both the pu... Read More
Advanced Data StructureDSA
Output of C++ Program | Set 4Difficulty Level: RookiePredict the output of below C++ programs.Question 1C #includeiostreamusing namespace std;int x = 10;void fun(){ int x = 2; { ... Read More
C++CPP-Output
Naive Pattern Searching for Distinct CharactersQuestion: We have discussed the Naive String matching algorithm. Consider a situation where all characters of a pattern are different. Can we modify the original Naive Str... Read More
Pattern SearchingDSA
1

...

12124121251212612127
GeeksforGeeks
location
Corporate & Communications Address:
A-143, 6th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
location
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play StoreGFG App on App Store
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • Careers
  • Contact Us
  • Corporate Solution
  • Campus Training Program
  • Explore
  • POTD
  • Practice Problems
  • Blogs
  • Upskill Courses
  • Connect
  • Tutorials
  • Programming Languages
  • DSA
  • Web Technology
  • AI, ML & Data Science
  • DevOps
  • CS Core Subjects
  • GATE
  • School Subjects
  • Software and Tools
  • Courses
  • ML and Data Science
  • DSA and Placements
  • Web Development
  • Data Science
  • Programming Languages
  • DevOps & Cloud
  • GATE
  • MongoDB Certifications
  • Preparation Corner
  • Interview Corner
  • Aptitude
  • Puzzles
  • GfG 160
  • System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved