logo

CuriousTab

CuriousTab

Discussion


Home C Programming Bitwise Operators See What Others Are Saying!
  • Question
  • Bitwise can be used to generate a random number.


  • Options
  • A. Yes
  • B. No

  • Correct Answer
  • No 


  • More questions

    • 1. Macro calls and function calls work exactly similarly.

    • Options
    • A. True
    • B. False
    • Discuss
    • 2. Will the following functions work?
      int f1(int a, int b)
      {
          return ( f2(20) );
      }
      int f2(int a)
      {
          return (a*a);
      }
      

    • Options
    • A. Yes
    • B. No
    • Discuss
    • 3. Functions can be called either by value or reference

    • Options
    • A. True
    • B. False
    • Discuss
    • 4. Every function must return a value

    • Options
    • A. Yes
    • B. No
    • Discuss
    • 5. What will be the output of the program assuming that the array begins at the location 1002 and size of an integer is 4 bytes?
      #include<stdio.h>
      
      int main()
      {
          int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
          printf("%u, %u, %u\n", a[0]+1, *(a[0]+1), *(*(a+0)+1));
          return 0;
      }
      

    • Options
    • A. 448, 4, 4
    • B. 520, 2, 2
    • C. 1006, 2, 2
    • D. Error
    • Discuss
    • 6. What will be the output of the program assuming that the array begins at location 1002?
      #include<stdio.h>
      
      int main()
      {
          int a[2][3][4] = { {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2}, 
                             {2, 1, 4, 7, 6, 7, 8, 9, 0, 0, 0, 0} };
          printf("%u, %u, %u, %d\n", a, *a, **a, ***a);
          return 0;
      }
      

    • Options
    • A. 1002, 2004, 4008, 2
    • B. 2004, 4008, 8016, 1
    • C. 1002, 1002, 1002, 1
    • D. Error
    • Discuss
    • 7. What will be the output of the program?
      #include<stdio.h>
      
      int main()
      {
          char *p;
          p="%d\n";
          p++;
          p++;
          printf(p-2, 23);
          return 0;
      }
      

    • Options
    • A. 21
    • B. 23
    • C. Error
    • D. No output
    • Discuss
    • 8. What will be the content of 'file.c' after executing the following program?
      #include<stdio.h>
      
      int main()
      {
          FILE *fp1, *fp2;
          fp1=fopen("file.c", "w");
          fp2=fopen("file.c", "w");
          fputc('A', fp1);
          fputc('B', fp2);
          fclose(fp1);
          fclose(fp2);
          return 0;
      }
      

    • Options
    • A. B
    • B. A
      B
    • C. B
      B
    • D. Error in opening file 'file1.c'
    • Discuss
    • 9. A preprocessor directive is a message from compiler to a linker.

    • Options
    • A. True
    • B. False
    • Discuss
    • 10. Bitwise can be used to perform addition and subtraction.

    • Options
    • A. Yes
    • B. No
    • Discuss


    Comments

    There are no comments.

Enter a new Comment