C++ Interview Questions
- 0of 0 votes
AnswersHow to find the length of the string in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersWhat is :: in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersWhat is conio.h in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersHow to find absolute value in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersHow to generate random numbers in C++ with a range?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersHow to use goto statement in C++ ?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersWhat is iostream in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersHow to clear screen in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersWhat is type casting in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersHow to run a C++ program in cmd?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersHow to convert integer to string in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersWhat is namespace in C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
AnswersWhat is C++?
- revathi.vestino May 03, 2021 in India for Technical| Report Duplicate | Flag | PURGE
vestino technologies Developer C++ - 0of 0 votes
Answersdeadlock detection is an important consideration in operating system of computer.In this problem you will be given a directed graph representing the state of the system.Your program should detect the whether there are any deadlocks in the system(A deadlock can be created by checking for the cycles in the graph
- swetankkanaujiamk March 21, 2020 in United States
the input will be in the form
process X holds sources Ri and wants resources Rj ( X holds the Rj means an edge Ri->X and X wants Rj means an edge X->Rj).Note that both processes and resources form nodes of the graph.
Use depth first traversal to determine whether they are the cycles in the graph.The graph contains a cycle if while expanding a node ,you encounter a child that is represent in the path from the root of the current tree to the node being expanded .You can assume that the maximum number number of nodes in the graph will not exceed 50| Report Duplicate | Flag | PURGE
C++ - 1of 1 vote
AnswersClass A has two data members which are instances of class B and class C. Class B needs an instance of class C to be created. We have to create an instance of object A on stack like 'A objA' in main function. 'new' operator should not be used anywhere.no objects on the heap
- vijay8836 December 18, 2019 in United States| Report Duplicate | Flag | PURGE
Adobe Software Engineer C++ - 0of 0 votes
AnswersQuestion 1:
- ratneshtr09 June 15, 2019 in United States
There is a bunch of tasks, each task has a code with different time to complete and task dependencies. There are few workers, how to allocate the task to these workers to minimize the total time taken to complete the task.
Example:
No of worker: 3
Task id, Task Time, Task dependency:
1, 2, 0
2, 4, 1
3, 7, 0
4, 12, 1
Question 2: Optimize the problem for total project cost and total project days to minimal.
Given the cost/hour of each worker:
[ 30, 25, 40 ]| Report Duplicate | Flag | PURGE
Intel SDE1 C++ - 0of 0 votes
Answer#include <iostream>
- reshma.dhotre November 30, 2018 in India
using namespace std;
int main()
{
int a = 32, *ptr = &a;
char ch = 'A', &cho = ch;
cho += a;
*ptr += ch;
cout << a << ", " << ch << endl;
return 0
}| Report Duplicate | Flag | PURGE
Bloomberg LP Senior Software Development Engineer C++ - 1of 1 vote
AnswersThe difference between move and forward in C++
- parni November 01, 2018 in United States| Report Duplicate | Flag | PURGE
Google C++ - 0of 0 votes
AnswerGiven a point and a radius r, draw a circle.
- Wandering programmer September 12, 2018 in United States| Report Duplicate | Flag | PURGE
Pure Storage Software Engineer C C++ - 0of 0 votes
AnswersHow to generate globally unique identifier(GUID)
- coder September 07, 2018 in India| Report Duplicate | Flag | PURGE
Software Engineer / Developer C# C++ - 0of 0 votes
AnswersGiven a singly linked list, write code to find the most frequent element value in the list and its occurrence.
- jp May 18, 2018 in United States
In case of duplicate number of occurrences, return the element value closest to the head.
A solution of time complexity O(N) average is preferred.
Sample Input: 1 2 3 4 2 3 2
Sample Output: Element 2 occurs 3 time(s)
Sample Input: 4 3 5 3 4 5
Sample Output: Element 4 occurs 2 time(s)| Report Duplicate | Flag | PURGE
C++ - 0of 0 votes
AnswerA king gathers all the men in the kingdom who are to be put to death for their crimes, but because of his mercy, he will pardon one. He gathers the men into a circle and gives the sword to one man. The man kills the man to his left, and gives the sword to the man to the dead man's left. The last man alive is pardoned.
- Kolloba February 09, 2018 in China
With 5 men, the 3rd is the last man alive.
Write a program that accepts a single parameter: a number N that represents the number of criminals to start with. The program should output the number of the last two men alive.
Example #1: myProgram 5
would output:
5, 3
Example #2: myProgram 7
would output:
3, 7| Report Duplicate | Flag | PURGE
C++ - 0of 0 votes
AnswersYou are given two numbers L and R, can you count how many number between L and R inclusive their first digit from left equal to one?
- walidmo3geza January 20, 2018 in Egypt| Report Duplicate | Flag | PURGE
C++ - 1of 1 vote
Answershow to create an object on the stack.
- Giri February 10, 2017 in India
and also make sure that only 5 objects are created for the class| Report Duplicate | Flag | PURGE
Oracle SDE-2 C++ - 2of 2 votes
Answersn points on a 2D space. You observe the points from (0,0) with viewing direction and viewing angle.
- Casper November 17, 2016 in United States
Given an array (xn,yn), and a viewing angle v (45 degree), find the direction that can observe max number of points.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer C++ - 1of 1 vote
AnswersYou are given a sorted list of distinct integers from 0 to 99, for instance [0, 1, 2, 50, 52, 75]. Your task is to produce a string that describes numbers missing from the list; in this case "3-49,51,53-74,76-99".
- Casper November 14, 2016 in United States
Examples:
[] “0-99”
[0] “1-99”
[3, 5] “0-2,4,6-99”| Report Duplicate | Flag | PURGE
Google Software Engineer Intern C++ - 0of 2 votes
AnswerAssume (n+1) points on a 2D space. You observe the points from (0,0) with viewing direction and viewing angle.
- Casper November 14, 2016 in United States
Given an array (xn,yn), and a viewing angle v (45 degree), find the direction that can observe max number of points.| Report Duplicate | Flag | PURGE
Google Software Engineer Intern C++ - 0of 0 votes
AnswersWrite a program to add the following
- D PRAVEEN KUMAR October 04, 2016 in India
¼+2/4+3/4+5/3+6/3+...| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C++