logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Programming Comments

  • Question
  • Write a quick script for launching a new activity within your application.


  • Correct Answer
  • An explicit intent explicitly defines the activity the developer wishes to start Script code : Intent myIntent = new Intent(this, MyNewActivityclass); startActivity(myIntent); 


  • Programming problems


    Search Results


    • 1. #define clrscr() 100 main() { clrscr(); printf( "%dn", clrscr() ); }

    • Options
    • A. 100
    • B. 0
    • C. Compilation error
    • D. Exception occurs
    • Discuss
    • 2. Which of the following is not a valid escape code?

    • Options
    • A. "
    • B. \
    • C. '
    • D. =
    • Discuss
    • 3. main() { char *p; p = "Hello"; printf ("%cn", *&*p); }

    • Options
    • A. H
    • B. Hello
    • C. Compilation error
    • D. H E L L O
    • Discuss
    • 4. A source program is the program written in which level language ?

    • Options
    • A. Alpha Numeric
    • B. High-Level
    • C. Symbolic
    • D. Machine
    • Discuss
    • 5. What will be output of following c code? #include int main() { int x=123; int i={ printf("c" "++") }; for(x=0;x<=i;x++){ printf("%x ",x); } return 0; }
    • Discuss
    • 6. The coding or scrambling of data so that humans cannot read them, is known as _____.

    • Options
    • A. Compression
    • B. Encryption
    • C. Ergonomics
    • D. Biometrics
    • Discuss
    • 7. public static void main string[] args Meaning is?
    • Discuss
    • 8. If the binary equivalent of 5.375 in normalized form is 0100 0000 1010 1100 0000 0000 0000 0000, what would be the output of the following program?
      main()
      
      {
      
          float a = 5.375 ;
      
          char *p;
      
          int i;
      
          p = ( char* ) &a ;
      
          for ( i = 0; i <= 3 ; i++ )
      
                printf ( " %02x ", (unsigned char ) p[i] );
      
      }
    • Discuss
    • 9. enum colors {BLACK,BLUE,GREEN} main() { printf( "%d..%d..%d", BLACK, BLUE, GREEN ); return(1); }

    • Options
    • A. 1..2..3
    • B. 0..1..2
    • C. 1..1..1
    • D. 0..0..0
    • Discuss
    • 10. What will be output when you will execute following c code? #include void main() { signed int a = -1; unsigned int b = -1u; if(a == b) printf( "The Lord of the Rings" ); else printf( "American Beauty" ); }

    • Options
    • A. The Lord of the Rings
    • B. American Beauty
    • C. Compilation error: Cannot compare signed number with unsigned number
    • D. Warning: Illegal operation
    • Discuss


    Comments

    There are no comments.

Enter a new Comment