• ( 1 ) Which Identifier is invalid ?
      1. int
      2. _sum
      3. 1sum
      4. s_num1
      5. s num1
      6. s-num1

    • 1) Options : 1,2,5
    • 2) Options : 1,3,5,6
    • 3) Options : 1,2,5,6
    • 4) Options : 3,4,5,6
    • Discussion in forum
      Answer : 3) Options : 1,2,5,6
      Solution : Rules for Valid Identifier
      First Letter Should be "Underscore" or "Alphabet"
      Digits are allowed except first Place
      Special Characters are not allowed
      White spaces not allowed








      discussion


      Answer : 3) Options : 1,2,5,6

    • ( 2 ) Modulus for float could be achieved by?

    • 1) a % b
    • 2) modulus(a, b);
    • 3) fmod(a, b);
    • 4) mod(a, b);
    • Discussion in forum
      Answer : 3) fmod(a, b);
      Solution :








      discussion


      Answer : 3) fmod(a, b);

    • ( 4 ) What is the range of long

    • 1) -2,147,483,648 to 2,147,483,647
    • 2) -32,768 to 32,767
    • 3) 0 to 65,535 or 0 to 4,294,967,295
    • 4) 0 to 4,294,967,295
    • Discussion in forum
      Answer : 1) -2,147,483,648 to 2,147,483,647
      Solution :








      discussion


      Answer : 1) -2,147,483,648 to 2,147,483,647

    • ( 6 ) What will be output when you will execute following c code?
      #include
      extern enum cricket x;
      int main()
      {
      printf("%d",x);
      return 0;
      }
      const enum cricket{ Taylor, Kallis=17, Chanderpaul }x=Taylor|Kallis&Chanderpaul; Choose all that apply:

    • 1) 0
    • 2) 15
    • 3) 16
    • 4) 17
    • Discussion in forum
      Answer : 3) 16
      Solution :








      discussion


      Answer : 3) 16

    • ( 7 ) Consider on following declaration:
      (i) short i=10;
      (ii) static i=10;
      (iii) unsigned i=10;
      (iv) const i=10;
      Choose correct one:

    • 1) Only (iv) is incorrect
    • 2) Only (ii) and (iv) are incorrect
    • 3) Only (ii),(iii) and (iv) are correct
    • 4) All are correct declaration
    • Discussion in forum
      Answer : 4) All are correct declaration
      Solution :








      discussion


      Answer : 4) All are correct declaration





Top