C++ General Interview Questions
Questions Answers Views Company eMail

What are the static members and static member functions?

1 639

What is the difference between shallow copy and deep copy?

1 529

How do you allocate and deallocate memory in C++?

1 764

Which operator can not be overloaded in C++?

1 545

Q1 On the screen how do you write the following words? she sells seashells by the seashore (a) all in one line (b) in three lines Q2 Write a program that asks interactively the user’s name and age and responds with Hello name, next year you will be next_age. where next_age is age + 1 Q3 For the different values of n, what is the output? printf(“%x %c %o %d”,n,n,n,n); (a) n = 67 (b) n = 20 (c) n = 128 (d) n = 255 (e) n = 100 Q4 What will be the output of the following program? int main() { char a,b,c; scanf(“%c %c %c”,&a,&b,&c); printf(“a=%c b=%c c=%c”,a,b,c); return 0; } [Note: The user input is:ABC DEF GHI]

1 1254

Write a C++ Program to Multiply two Numbers

1 492

Write a C++ Program to Generate Random Numbers between 0 and 100

1 699

int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}

835


Post New C++ General Questions

Un-Answered Questions { C++ General }

Explain virtual class and friend class.

603


What are the unique features of C++.

573


what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?

1772


Is c++ an integer?

578


What is abstract class in c++?

588






What is a class definition?

613


What are the benefits of oop in c++?

586


What is low level language in simple words?

564


Declare a class vehicle and make it an abstract data type.

539


How to tokenize a string in c++?

604


How do you sort a sort function in c++ to sort in descending order?

558


How do you clear a buffer in c++?

539


Write a program to read the data and evaluate the results of the election. Print all output to the screen. Your output should specify: The total number of votes, the number of valid votes and the number of spoilt votes. The winner(s) of the election. Hint: An appropriate search should be used to determine the winner(s). The votes obtained by each candidate sorted in terms of the number of votes obtained. Hint: An appropriate sort should be used to sort the candidate(s). The Source code should be saved as VotingSystem. Project Input: Candidates’ Names and Numbers 2501 Victor Taylor 2502 Denise Duncan 2503 Kamal Ramdhan 2504 Michael Ali 2505 Anisa Sawh 2506 Carol Khan 2507 Gary Owen Votes 3 1 2 5 4 3 5 3 5 3 2 8 1 6 7 7 3 5 6 9 3 4 7 1 2 4 5 5 1 4 0 Project Output: Invalid vote: 8 Invalid vote: 9 Number of voters: 30 Number of valid votes: 28 Number of spoilt votes: 2 The winner(s): 2503 Kamal Ramdhan 2505 Anisa Sawh Candidate Score 2503 Kamal Ramdhan 6 2505 Anisa Sawh 6 2501 Victor Taylor 4 2504 Michael Ali 4 2502 Denise Duncan 3 2507 Gary Owen 3 2506 Carol Khan 2

2654


what are the decision making statements in C++? Explain if statement with an example?

654


what Is DCS ? what i will get benefit when i did?

1836