logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Programming Comments

  • Question
  • public static void main string[] args Meaning is?


  • Correct Answer
  • Here in this declaration public static void main string[] args, each keyword has its importance 1 public - Here public is an access specifier which allows the main method to be accessible everywhere 2 static - static helps the main method to get loaded without getting called by any instance/object 3 void - void clarifies that the main method will not return any value 4 main - It's the name of the method 5 String[] args - Here we are defining a String array to pass arguments at the command line args is the variable name of the String array 

  • Tags: Project Manager, IT Trainer, Database Administrator, Analyst

    Programming problems


    Search Results


    • 1. 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
    • 2. Write a quick script for launching a new activity within your application.
    • Discuss
    • 3. #define clrscr() 100 main() { clrscr(); printf( "%dn", clrscr() ); }

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

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

    • Options
    • A. H
    • B. Hello
    • C. Compilation error
    • D. H E L L O
    • Discuss
    • 6. 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
    • 7. 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
    • 8. 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
    • 9. What would be the output of the following program? main() { extern int fun ( float ); int a; a = fun ( 3. 14 ); printf ("%d", a); } int fun ( aa ) float aa ; { return ( (int) aa ); }
    • Discuss
    • 10. In programming, repeating some statements is usually called ?

    • Options
    • A. Running
    • B. Structure
    • C. Looping
    • D. Control structure
    • Discuss


    Comments

    There are no comments.

Enter a new Comment