C++ Program Output Questions Question 1: int main(){ int i = 0; int& r = i; int *p = &i; i++; r++; (*p)++; cout << “i = “ << i <<endl; } Question 2: int main(){ char str1[] = “hello”; char str2[] = str1; cout << str1 << str2; } [...]
July 2nd, 2010 | Posted in Questions and Answers | No Comments
There are flood of tutorials on C++ and Example source codes as well as sample codes and videos. Today I’m referring to a website dedicated to C++ learning – LearnCpp.com, ‘Tutorials to help you master C++ and object-oriented programming’. This website is a complete online book as well. The site is divided into 18 chapters [...]
June 30th, 2010 | Posted in References | No Comments
If you remember, I’d pointed you to Ram Hari Regmi’s website for some C Programming language class Notes where he published 7 notes pdf files for free – Introduction to C, Fundamentals of C, Input Output Statements, Control Statements, Arrays, Functions, Structures and Union. If you are interested to download those 7 pdf files of [...]
June 29th, 2010 | Posted in Downloads | No Comments
1. STL is based on which of the following programming paradigms? a. Structured Programming b. Object Oriented Programming (OOP) c. Functional Programming d. Aspect Oriented Programming (AOP) 2. Which of the following correctly describes the meaning of ‘namespace’ feature in C++? a. Namespaces refer to the memory space allocated for names used in a program [...]
June 27th, 2010 | Posted in Multiple Choice Questions | No Comments
Internet is a vast resource of free learning materials and what can be a more effective to learn a practical topic like C/C++ programming? Obviously video tutorials. Most of us are using video sharing services like YouTube to share interesting video clips among friends. But it can’t be ignored that there exist some great content [...]
June 26th, 2010 | Posted in Uncategorized | No Comments
These are the answers to the C++ Multiple Choice Questions Set 2 filed under Multiple Choice Questions. You can click here to go to Questions of Set 2. 1. The conditional compilation c. It is compiling a program based on a condition 2. Originally ‘C’ was developed as: b. General purpose language 3. Minimum number [...]
June 19th, 2010 | Posted in Multiple Choice Questions, Questions and Answers | No Comments
C++ Multiple Choice Questions Set 1 was posted on Monday, June 7th, 2010 and is filed under Multiple Choice Questions. You can click here to go to Questions of Set 1 and the Answers of Set 1. Today, here are the twenty questions for second set – C++ Multiple Choice Questions Set 2. Click here [...]
June 19th, 2010 | Posted in Multiple Choice Questions | 1 Comment
Download Stack Class Source Code stack.cpp The day before, we talked about stack data structure in http://data-structures-and-algorithms.psexam.com/stacks-data-structure/ regarding ‘What is data structure?’, Stack Operation, Uses of Stacks and Stack Representation. We talked a lot on theory. The explanation is never complete without an example. Here is the code for a C++ class of stack data [...]
June 16th, 2010 | Posted in Examples, Source Codes | 1 Comment
I have presented following 100 questions that were asked in different exams from C/C++ chapter. It would take long to finish answering all these questions and then publish. So, I presented the questions first and will go digging for answers in coming posts, probably. I’m planning to create a small ebook of C++ Short Questions [...]
June 10th, 2010 | Posted in Questions and Answers | No Comments
Q.1. Who invented C programming language and when? C programming language was invented by Dennis Richie at Bell Telephone Laboratories in 1972. Q.2. What were the primary goals to develop C programming language? C programming language was developed primarily as a system language, i.e. a language to write operating systems. The primary goals were to: [...]
June 7th, 2010 | Posted in Questions and Answers | No Comments