Cramster.com - Homework Solutions, Lecture Notes, Exams, and Free Online Homework Help
Sign Up Now! Login Customer Support Cramster Blog
McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Problem Solved.
    Home    
    Homework Help    
   Answer Board   
    Resources (Beta)    
   
Member's Topic Headline:

C++ its urgent

Know the answer? Have a better solution? Share it.
Sign Up Now for FREE!
Join the thousands of students
getting ahead in their classes.
Member Testimonials

Question:

Advertisement:

Answer | Ask New Question | Customize Profile | Leaderboards | 
FAQ

Member's Avatar

Scholar
Karma Points: 201
Respect (96%):
Date Posted: 7/23/2008 2:04:24 AM  Status: Live
C++ its urgent
Course Textbook Chapter Problem
Data Structures C++: How to Program (5th) by Deitel, Deitel, Deitel N/A N/A
Question Details:
Q No,1                                        (i)
Which of the following is true about streams?
     
                   A) It is a sequence of bytes
                   B)it is an ordered sequence.
                   C)All bytes can go through the stream simultaneously.
                   D)Bytes thet enters first into the stream will go out at least.
 
                                                     (ii)
Consider the following code segment.
 
1 - String s1, s2;
2 - s1 = s2;
 
Which of the following will be called while executing code at kine 2?
 
                       A)Copy constructor
                       B)Default constructor
                       C)Assignment operator
                       D)Parameterized constructor
 
                                                  (iii)
What is the difference between cout and cerr?
                    
                     A)Cout is unbuffered output and cerr is buffered output
                     B)Cout is standard output and cerr is not a standard output
                     C)Cout is not a standard output and cerr is standard output
                     D)Cout is buffered output and cerr is unbuffered output
 
                                                   (iv)
If text is a pointer of type String then what will be the functionality of following statement?
 
text = new String[5];
 
                      A)Creates array of 5 Staring objects statically.
                      B)Creates array of 5 String objects dynamically
                      C)Creates array of pointers to String objects
                      D)Creates a String object
 
   

Answers:

Member's Avatar

Expert
Karma Points: 1,147
Date Posted: 7/23/2008 3:33:59 AM  Status: Live
Asker's Rating: Somewhat Helpful   
Response:
Dear
 
i) A) It is a sequence of bytes
 
ii) C)Assignment operator
 
iii) B)Cout is standard output and cerr is not a standard output
 
iv)D)Creates array of 5 string objects dynamically

Member's Avatar

Mentor
Karma Points: 508
(SVITS , Indore)
Date Posted: 7/23/2008 3:44:18 AM  Status: Live
Asker's Rating: Lifesaver   
Response:
Plz Do rate d Solution !!

i) A) It is a sequence of bytes
 
ii) C)Assignment operator
 
iii) B)Cout is standard output and cerr is not a standard output
 
iv) B)Creates array of 5 String objects dynamically

v)
A)Zero

vi)
  A)Assignment(=)

vii) 
 D)Unreferenced memory

viii)
  D)Read and write member functions of cin and cout objectsare used to read a word from the keyboard and print it on screen

ix)  C)Buffer

x)D)Default constructor will be called for first 2 objects

Never hesitate to ask a question & Never fear of answering a question !!

Member's Avatar

Rookie
Karma Points: 5
Date Posted: 7/23/2008 4:12:29 AM  Status: Live
Asker's Rating: Helpful   
Response:
Answers
Question No 1.) Both A and B
Question No. 2) Assignment operator
Question No. 3)Cout is buffered output and cerr is unbuffered output
Question No. 4)Creates array of 5 String objects dynamically
Question No. 5)One

Member's Avatar

Pupil
Karma Points: 61
Date Posted: 7/23/2008 4:23:14 AM  Status: Live
Asker's Rating: Lifesaver   
Response:
I am sending only option answer
Question No.                                           Options
 
Question No.1                                         A
Question No.2                                         C
Question No.3                                         B
Question No.4                                         B
Question No.5                                         A
Question No.6                                         A
Question No.7                                         D
Question No.8                                         D
Question No.9                                         C
Question No.10                                       D



By reading or posting messages on these forums, you are agreeing to the Answer Board's Terms of Service and Conduct (TSC).


About Cramster | Terms of Use | Privacy Policy | Contact Us | Press Room | Site Map | Support | Anti-Cheating Policy

Cramster.com is not affiliated with any publisher. Book covers, title and author names appear for reference only.
Copyright © 2008 Cramster, Inc.