logo

CuriousTab

CuriousTab

Programming problems


  • 1. main() { char s[ ] = "man"; int i; for( i=0; s[ i ]; i++) printf( "n%c%c%c%c", s[ i ], *(s+i), *(i+s), i[s] ); }

  • Options
  • A. mmmm aaaa nnnn
  • B. aaaa mmmm nnnn
  • C. nnnn aaaa mmmm
  • D. None
  • Discuss
  • 2. 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
  • 4. main() { char *p; p = "Hello"; printf ("%cn", *&*p); }

  • Options
  • A. H
  • B. Hello
  • C. Compilation error
  • D. H E L L O
  • Also asked in: Software Architect

  • Discuss
  • 5. Which of the following is not a valid escape code?

  • Options
  • A. "
  • B. \
  • C. '
  • D. =
  • Also asked in: Analyst, Database Administrator, IT Trainer

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

  • Options
  • A. 100
  • B. 0
  • C. Compilation error
  • D. Exception occurs
  • Discuss
  • 7. Write a quick script for launching a new activity within your application.
  • Discuss
  • 8. 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
  • 9. public static void main string[] args Meaning is?
  • Also asked in: Project Manager, IT Trainer, Database Administrator, Analyst

  • Discuss
  • 10. 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

First 2 3 4 ... 6 .. 9 10 Last