C++ Tutorials/ C - Aptitude Papers

C language is one of the traditional computer languages. It is one of the basic computer language to be learnt by everyone before entering the big software world. Though it is basic, the concepts of C are widely accepted and used in all other computer languages like Java etc. The attachment consists of C++ tutorials and aptitude questionnaire with answers which can act as a guide for the starters/learners of C.

Following is the snapshot of the C++ tutorials. Refer the document in the attachment for further explanations
C++ Namespaces
INTRODUCTION TO NAMESPACES - PART 1
Namespaces are a relatively new C++ feature just now starting to appear in C++ compilers.
We will be describing some aspects of namespaces in subsequent newsletters.
What problem do namespaces solve? Well, suppose that you buy two different generalpurpose
class libraries from two different vendors, and each library has some features that
you'd like to use. You include the headers for each class library:
#include "vendor1.h"
#include "vendor2.h"
and then it turns out that the headers have this in them:
// vendor1.h
... various stuff ...
class String {
...
};
// vendor2.h
... various stuff ...
class String {
...
};
This usage will trigger a compiler error, because class String is defined twice. In other words,
each vendor has included a String class in the class library, leading to a compile-time clash.
Even if you could somehow get around this compile-time problem, there is the further
problem of link-time clashes, where two libraries contain some identically-named symbols.
The namespace feature gets around this difficulty by means of separate named namespaces:
// vendor1.h
... various stuff ...
namespace Vendor1 {
class String {
...
};
}


Following is the snapshot of the document of the C- aptitude. Please refer the attachment for complete set of aptitude papers.
Predict the output or error(s) for the following:
1. void main()
{
int const * p=5;
printf("%d",++(*p));
}
Answer:
Compiler error: Cannot modify a constant value.
Explanation:
p is a pointer to a "constant integer". But we tried to change the value of the
"constant integer".


Attachments

Related Links

Comments (141)

b.uppalaiah
Said this on 12-17-2007 At 10:15 am
thanking you
suneel
Said this on 12-18-2007 At 09:11 am
please
manoj
Said this on 12-18-2007 At 02:29 pm
good
chaitanya
Said this on 12-18-2007 At 04:52 pm
exclent
amit
Said this on 12-22-2007 At 11:22 pm
its fine 2 get d knowlege about the placement .
RAHUL RANJAN
Said this on 12-23-2007 At 02:16 am
the questions are really nice and will surely help students like me for preparing for placement tests of c/c++.all questions are quality questions.
RAVI
Said this on 12-26-2007 At 10:02 am
GOOD
prabhu@sastra
Said this on 1-5-2008 At 11:03 am
thk u, i hope that this article will help me to get placement............
KUMAR
Said this on 1-7-2008 At 05:01 pm
USEFUL
manish vyas
Said this on 1-9-2008 At 10:20 am
thk u, i hope this article will help me to get placement...........
Pradeep
Said this on 1-10-2008 At 03:31 pm
Nice one, very useful
arun
Said this on 1-17-2008 At 02:45 pm
too good
pappu singh patel
Said this on 1-17-2008 At 03:22 pm
i want to see question paper
DEBAYAN KUNDU
Said this on 1-19-2008 At 05:49 pm
EXCELLENT,HOPE IT "LL HELP ALL OF US TO ACHIVE OUR TARGET/RIGHT GOAL.
SHOVAN Mukherjede
Said this on 1-20-2008 At 08:54 pm
It has helped me a lot
lalit
Said this on 1-23-2008 At 02:17 am
please send resent paper for tcs
manos
Said this on 1-23-2008 At 05:54 pm
contacts
harish
Said this on 1-28-2008 At 08:26 pm
very good
Edwin rajaram.k
Said this on 1-29-2008 At 05:15 pm
its some useful to me....
sravan
Said this on 1-31-2008 At 11:45 am
very nice
shobha
Said this on 2-2-2008 At 12:00 pm
nice
praphul
Said this on 2-2-2008 At 04:22 pm
display the apptitude papers
prasad
Said this on 2-3-2008 At 02:31 pm
exlllent
Prashant Sinha (Sibaca)
Said this on 2-4-2008 At 01:15 pm
It is Very Useful To Me
ramesh
Said this on 2-4-2008 At 01:37 pm
ya it is very usefull to us.
amit kumar
Said this on 2-5-2008 At 10:59 am
ghaziabad
sridevi
Said this on 2-5-2008 At 01:35 pm
excellent
ajay
Said this on 2-5-2008 At 05:01 pm
c c++
keerti kushwah
Said this on 2-6-2008 At 08:38 am
if the interviewer ask- do you have anyone else in your opinion better than you for this job ?then what to reply.
jeyaprakash
Said this on 2-6-2008 At 10:04 pm
It is very helpful for the interview point of view and useful to gain some knowledge
ruchi
Said this on 2-8-2008 At 09:03 pm
thank you very much
ram
Said this on 2-12-2008 At 02:13 pm
faltu
swathiparthiban
Said this on 2-13-2008 At 03:49 pm
actually tis hepled me a lot 2 get placed in wipro. really i thank u a lot......
Mohammed Fayaz
Said this on 2-13-2008 At 04:12 pm
It is a very good article.
yoganathan
Said this on 2-15-2008 At 02:39 pm
thank you
owen
Said this on 2-18-2008 At 11:07 am
thanks
Rohit sharma
Said this on 2-21-2008 At 05:53 pm
Nice help
subhash
Said this on 2-25-2008 At 10:34 am
it's very important for the begginers
devendra
Said this on 2-25-2008 At 01:41 pm
excellent.
pramod
Said this on 2-28-2008 At 12:38 pm
its realy amazan for me
kiran
Said this on 2-28-2008 At 02:14 pm
It should be very useful for the job seekers
sivasankar
Said this on 2-29-2008 At 10:29 am
all happies
manisha
Said this on 2-29-2008 At 03:48 pm
its really helpful to understand thouroughlly
sanjh
Said this on 3-4-2008 At 01:06 am
plz enter those companies who don take 10th& in under grad. aggrigate 60% and all r good
karthick
Said this on 3-4-2008 At 06:12 pm
no
Said this on 3-6-2008 At 11:14 am
asd dfdfdg fgdfg
dinesh
Said this on 3-7-2008 At 12:07 pm
good
kumar
Said this on 3-8-2008 At 10:19 am
poor
Anbazhagan
Said this on 3-8-2008 At 10:30 am
Very Nice
Saranya
Said this on 3-8-2008 At 12:27 pm
really awesome!!
Post a Comment
* Your Name:
* Your Email:
(not publicly displayed)
Reply Notification:
Approval Notification:
Website:
* Security Image:
Security Image Generate new
Copy the numbers and letters from the security image:
* Message:

Email to Friend

Fill in the form below to send this article to a friend:

Email to Friend
* Your Name:
* Your Email:
* Friend's Name:
* Friend's Email:
* Security Image:
Security Image Generate new
Copy the numbers and letters from the security image
* Message: