Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
DSA
22.5K+ articles
Python
20.5K+ articles
Java
10.5K+ articles
C++
4.3K+ articles
GBlog
3.2K+ articles
C++ Programs
2.4K+ articles
Competitive Programming
2.3K+ articles
C Language
2.1K+ articles
Algorithms
2.0K+ articles
Data Structures
1.2K+ articles
Programming Language
/
C++
/
C++ Quiz
C++ Quiz
155+ posts
Recent Articles
Popular Articles
Minimum cost of choosing 3 increasing elements in an array of size N
Last Updated: 04 June 2024
Given two arrays arr[] and cost[] where cost[i] is the cost associated with arr[i], the task is to find the minimum cost of choosing three elements from the array such tha...
read more
Arrays
Algorithms
Dynamic Programming
Competitive Programming
subsequence
C++
C++ Quiz
DSA Quiz
C++ Programs
DSA
C/C++ Puzzles
Comparing X^Y and Y^X for very large values of X and Y
Last Updated: 29 August 2024
Given two integer X and Y, the task is compare XY and YX for large values of X and Y.Examples:Input: X = 2, Y = 3Output: 2^3 3^223 32Input: X = 4, Y = 5Output: 4^5 5^4N...
read more
Algorithms
Mathematical
Competitive Programming
Programming Language
C++
School Programming
C++ Quiz
DSA Quiz
Engineering Mathematics
C++ Programs
Mathematics
DSA
C/C++ Puzzles
Increment odd positioned elements by 1 and decrement even positioned elements by 1 in an Array
Last Updated: 19 April 2024
Given an array arr[], the task is increment all the odd positioned elements by 1 and decrement all the even positioned elements by 1.Examples:Input: arr[] = {3, 6, 8}Outpu...
read more
Interview Experiences
Algorithms
Competitive Programming
Programming Language
C Language
C++
C Quiz
C++ Quiz
C Programs
C++ Programs
DSA
C/C++ Puzzles
Experiences
Replacing the odd place by cubing and even place by squaring the elements of an Array
Last Updated: 21 May 2025
Examples:Input : a[] = 3,4,5,2 Output : 27, 16, 125 , 4Input :a[]= 2,7,4,9Output :8,49,64,81 Ps not apply to articles written through thePick SectionHi Authors, Starting ...
read more
Algorithms
Computer Subject
Puzzles
C Language
GeeksQuiz
CS - Placements
Computer Science Quizzes
C Quiz
C++ Quiz
C Programs
DSA
Program to print 'N' alphabet using the number pattern from 1 to n
Last Updated: 11 July 2022
Given an integer N, the task is to print the Alphabet N Pattern as given below:1 12 2 23 3 3* * ** * ** * *N NE...
read more
Pattern Searching
C Language
C++
C Quiz
C++ Quiz
C Programs
C++ Programs
DSA
C/C++ Puzzles
Ittiam Written Test Questions
Last Updated: 23 April 2024
Round 1(30 mins): Written Test It was a written round (pen-paper). It started just after the company’s ppt (pre-placement talk). There were a total of 20 Mcqs (with neg...
read more
Java
Advanced Data Structure
Operating Systems
C Language
Aptitude
C Quiz
C++ Quiz
Java Quiz
Operating Systems Questions
Theory of Computation
C Programs
Java Programs
DSA
C/C++ Puzzles
Why are negative numbers stored as 2's complement?
Last Updated: 03 October 2018
When doing addition/subtraction on binary numbers in other representations we need to apply different logics (circuits) to perform addition and subtraction. In 2s-compleme...
read more
Misc
Programming Language
Puzzles
C++
C Quiz
C++ Quiz
C Programs
C++ Programs
C/C++ Puzzles
ungetc() in C/C++
Last Updated: 25 October 2018
The ungetc() function takes a single character and shoves it back onto an input stream. It is the opposite of the getc() function, which reads a single character from an i...
read more
Misc
Programming Language
C Language
C Quiz
C++ Quiz
C Programs
C++ Programs
C#
Largest of two distinct numbers without using any conditional statements or operators
Last Updated: 13 August 2024
Given two positive and distinct numbers, the task is to find the greatest of two given numbers without using any conditional statements(if...) and operators(?: in C/C++/Ja...
read more
Puzzles
School Programming
Aptitude
C++ Quiz
C++ Programs
Check if all occurrences of a character appear together
Last Updated: 12 August 2022
Given a string s and a character c, find if all occurrences of c appear together in s or not. If the character c does not appear in the string at all, the answer is true.E...
read more
Algorithms
Competitive Programming
C Language
C++
Data Structures
School Programming
C++ Quiz
DSA Quiz
C Programs
C++ Programs
DSA
C/C++ Puzzles
C++ | Misc C++ | Question 8
Last Updated: 28 June 2021
[sourcecode language="CPP"]#includeiostreamusing namespace std;int main (){ int cin; cin cin; cout cin cin; return 0;}[/sourcecode]Thanks to Gok...
read more
C Language
C++ Quiz
C++-Misc C++
Misc C++
C++ | Misc C++ | Question 7
Last Updated: 28 June 2021
[sourcecode language="C"]#includeiostreamusing namespace std;int x[100];int main(){ cout x[99] endl;}[/sourcecode]This question is contributed by Sudheendra Baliga(A)...
read more
C Language
C++ Quiz
C++-Misc C++
Misc C++
C++ | Inheritance | Question 14
Last Updated: 28 June 2021
Consider the below C++ program.[sourcecode language="C"]#includeiostreamusing namespace std;class A{public: A(){ cout 1;} A(const A obj){ cout 2;}};class B: virtua...
read more
C Language
C++ Quiz
C++-Inheritance
Inheritance
C++ | Misc C++ | Question 6
Last Updated: 28 June 2021
Would destructor be called, if yes, then due to which vector?[sourcecode language="C"]#include iostream#include vectorusing namespace std;class a{public : ~a() { ...
read more
C Language
C++ Quiz
C++-Misc C++
Misc C++
C++ | const keyword | Question 5
Last Updated: 28 June 2021
Output of C++ program?[sourcecode language="C"]#include iostreamint const s=9;int main(){ std::cout s; return 0;}[/sourcecode]Contributed by Pravasi Meet(A) 9(B) Co...
read more
C Language
C++ Quiz
C++-const keyword
const keyword
1
2
3
4
...
11
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !