c ++ tip qa

download c ++  tip qa

of 4

Transcript of c ++ tip qa

  • 8/10/2019 c ++ tip qa

    1/4

    1.What is encapsulation?

    A. Combination of members & member functionsB. Many FormsC. Group of MembersD. None Ans A

    . What is an ob!ect?A. Combination of members & member functionsB.An instance of a classC. "ariableD. None Ans.B

    #. $tructure %efault $cope?A.ublicB. ri'ateC. rotectD.Global Ans.A

    (. What is )eturn type of Constructor?A.'oi%B. Class *ypeC. int

    D. none Ans D+. char f,- cout// 0char0 2 int f,- cout//0int0 2 'oi% main,- f,- 2 3hat is output?

    A. charB. intC. BothD. 4rror Ans D

    5. 'oi% print,int a-

    cout//0 6nt 70//a 2 'oi% print,%ouble %-

    cout//0%ouble70//% 2

    'oi% main,-

    float f819 print,f-23hat is output?A. %ouble 7 19.999999B. int 719C.BothD. None Ans.A

    :. ;77; operator is calle%?

  • 8/10/2019 c ++ tip qa

    2/4

    A. 6nsertion operatorB. 4

  • 8/10/2019 c ++ tip qa

    3/4

    D. NoneAns.B

    15. 3hat is static functionA. Which is not a class memberB. Which is access all properties of classC. 3hich is access only static 'ariablesD. None

    Ans C1: What are storae classes?

    A. public Ppri'atePprotectB. autoPstaticPreisterPeen *hompsonB. Dennies )itchieC. Bharne $troustrupD. Martin )icher%s

    Ans.C1. C is an e

  • 8/10/2019 c ++ tip qa

    4/4

    D. NoneAns.A

    +. 3hat is the hea%er file manipulators?

    A. alloc.hB. ctype.hC. manip.hD. iostream.hAns.C

    5. What is the class to open a file in input mo%e?A. ifstreamB. ofstreamD. istream4. NoneAns.A