Study

Week 7 Review

  •   0%
  •  0     0     0

  • Which is boolean operator for logical and ?
    &&
  • How do you create a variable with the floating number 2.8?
    float num=2.8;
  • What is 2 in the power of 0?
    1024
  • How to put multiple lines comment in c++?
    /* */
  • What is this operator called "(....)?... : ..." ?
    conditional
  • If m and n are int type variables, what will be the result of the expression. m%n (when m=5 and n=2)
    1
  • What is the output?
    "Looking forward to the Weekend"
  • What does "break" stand for?
    It is used to terminate the loop
  • What does "cin" stand for?
    extracts from stream; (i.e: gets input from console)
  • Which keyword is used to return a value inside a function?
    return
  • Convert the following binary number to hex: 1010 1111 1000 0101
    AF85
  • How to convert binary number 11001 with size 8 Two's complement number??
    11100111
  • How many types of comments are there in c++?
    2 - Single line comments uses double slash //. Multiple line comments uses /* comment inside */.
  • How is A in hex represented in binary?
    1010
  • Which statement is used to stop a loop?
    break
  • Which operator is used to multiply numbers?
    *
  • How many bytes float data type can store?
    4
  • What is the index number of the last element of an array with 9 elements?
    8
  • What does "continue" stand for?
    The continue statement breaks one iteration (in the loop),
  • What is result of this operation TRUE || FALSE?
    TRUE