programming languages Online Quiz - 255
Description: programming languages Online Quiz - 255 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
program helloworld(output); var I: Integer; begin WriteLn('Hello, World!'); for I := 1 to 10 do WriteLn(I); end
000100 IDENTIFICATION DIVISION. 000200 PROGRAM-ID. HELLOWORLD. 000300 000400* 000500 ENVIRONMENT DIVISION. 000600 CONFIGURATION SECTION. 000700 SOURCE-COMPUTER. RM-COBOL. 000800 OBJECT-COMPUTER. RM-COBOL. 000900 001000 DATA DIVISION. 001100 FILE SECTION. 001200 100000 PROCEDURE DIVISION. 100100 100200 MAIN-LOGIC SECTION. 100300 BEGIN. 100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS. 100500 DISPLAY "Hello world!" LINE 15 POSITION 10. 100600 STOP RUN. 100700 MAIN-LOGIC-EXIT. 100800 EXIT.
with Text_To; use Text_To procedure hello is begin put("Hello World"); end hello
hello_world :- write('Hello World!').
C++ main() { cout << "Hello World!"; return 0; }
JAVA class myfirstprog { public static void main(String args[]) { System.out.println("Hello World!"); } }
Identify the programming language
10 PRINT "Hello World!" 20 GOTO 10
PROGRAM HELLO WRITE(,) 'Hello World' END PROGRAM
main() { cout << "Hello World!"; return 0; }
class myfirstprog { public static void main(String args[]) { System.out.println("Hello World!"); } }
Find a character in a string. Choose the correct one.
Find character in string from the end. Choose the correct one.
Append character to string
Return size of allocated storage
Which of the following statements regarding threads is true?
You have created a TimeOut class as an extension of Thread, the purpose being to print a "Time's Up" message if the Thread is not interrupted within 10 seconds of being started. Here is the run method that you have coded. 1. public void run() 2. { 3. System.out.println("Start!"); 4. try 5. { 6. Thread.sleep(10000); 7. System.out.println("Time's Up!"); 8. } 9. catch(InterruptedException e) 10. { 11. System.out.println("Interrupted!"); 12. } 13. } Given that a program creates and starts a TimeOut object, which of the following statements is true?
There are 10 threads waiting for the lock of an object. How will you bring the 5th thread myThread out of the waiting state?
Which of the following statements regarding the wait() method are correct? choose three