0
Alien head

programming languages Online Quiz - 8

Description: programming languages Online Quiz - 8
Number of Questions: 20
Created by:
Tags: programming languages

SAS can't be used for "Data Presentation"

  1. True

  2. False

Answer: 2

SAS can be used to

  1. Data access

  2. Data management

  3. Data analysis

  4. All the above

Answer: 4

SAS is a

  1. Sixth Generation Language

  2. Third Generation Language

  3. Fifth Generation Language

  4. Fourth Generation Language

Answer: 4

SAS is a

  1. Low Level Language

  2. High Level Language

  3. Machine Level Language

  4. Binary Level Language

Answer: 2

SAS stands for

  1. Statistical Analysis System

  2. Statistical Analysis Systems

  3. Statistic Analysis System

  4. Statestical Analysis System

Answer: 1

Given:

import java.util.*;   
public class Looking {   
  public static void main(String[] args) {   
    String input = "1 2 a 3 45 6";   
    Scanner sc = new Scanner(input);   
    int x = 0;   
    do {  
       x = sc.nextInt();  
       System.out.print(x + " ");  
     } while (x!=0);  
   }  
 }

What is the result?

  1. 1 2

  2. 1 2 3 45 6

  3. 1 2 3 4 5 6

  4. 1 2 a 3 45 6

  5. 1 2 followed by an exception

Answer: 5

Given:

import java.util.regex.*;   
public class Archie {   
  public static void main(String[] args) {   
    Pattern p = Pattern.compile(args[0]);   
    Matcher m = p.matcher(args[1]);   
    int count = 

    while(m.find())  
       count++;  
     System.out.print(count);  
   }  
 }

And given the command line invocation:

java Archie "\d+" ab2c4d67
What is the result?

  1. 0

  2. 3

  3. 4

  4. 8

  5. 9

Answer: 2

Given:

class TKO {
    public static void main(String[] args) {
        String s = "-";
        Integer x = 343;
        long L343 = 343L;
        if(x.equals(L343))  s += ".e1 ";
        if(x.equals(343))  s += ".e2 ";
        Short s1 = (short)((new Short((short)343)) / (new Short((short)49)));
        if(s1 == 7)        s += "=s ";
        if(s1 < new Integer(7+1))  s += "fly ";
        System.out.println(s);
    }
}

Which of the following will be included in the output String s? (Choose all that apply.)

  1. .e1

  2. .e2

  3. =s

  4. fly

Answer: 2,3,4

Given:


import java.util.*;   
public class Magellan {   
  public static void main(String[] args) {   
    TreeMap myMap = new TreeMap();   
    myMap.put("a", "apple"); myMap.put("d", "date");   
    myMap.put("f", "fig"); myMap.put("p", "pear");   
    System.out.println("1st after mango: " +   // sop 1  
       myMap.higherKey("f"));  
     System.out.println("1st after mango: " +   // sop 2  
       myMap.ceilingKey("f"));  
     System.out.println("1st after mango: " +   // sop 3  
       myMap.floorKey("f"));  
     SortedMap sub = new TreeMap();  
     sub = myMap.tailMap("f");  
     System.out.println("1st after mango: " +   // sop 4  
       sub.firstKey());  
   }  
 }

Which of the System.out.println statements will produce the output 1st after mango: p?

  1. sop 1

  2. sop 2

  3. sop 3

  4. sop 4

  5. compilation fails

Answer: 1

Given:

public static void before() {
    Set set = new TreeSet();
    set.add("2");
    set.add(3);
    set.add("1");
    Iterator it = set.iterator();
    while (it.hasNext())    System.out.print(it.next() + " ");
}

Which statements are true?

  1. The before() method will print 1 2

  2. The before() method will print 1 2 3

  3. The before() method will print three numbers, but the order cannot be determined

  4. The before() method will not compile

  5. The before() method will throw exception at runtime

Answer: 5

What is the output of the below JavaScript?


var one = ["a", "b", "c", "d"];         
alert(one.slice(-2));       

  1. error

  2. a,b

  3. a,b,c,d

  4. c,d

Answer: 4

var one = ["a", "b", "c"];          
one.pop();          
alert(one);     

  1. a,b

  2. b,c

  3. error

  4. a,b,c

Answer: 1

var one = ["a", "b"];
alert(one.join("&&"));      

  1. a&&b

  2. ab&&

  3. a,b,&&

  4. error

Answer: 1

var one = ["a", "b"];       
var two = ["c", "d"];       
var three = one.concat(two);        alert(three);       

  1. abcd

  2. a,b,c,d

  3. c,d,a,b

  4. error

Answer: 2

    var str = "This is an Example";
    alert(str.replace("Example", "Error"));     

  1. Example

  2. Error

  3. This is an Example

  4. This is an Error

Answer: 4

var str = "This is an Example"; 
 alert(str.search("example"));      

  1. 11

  2. -1

  3. error

  4. Example

Answer: 2

var str = "This is an Example";
  alert(str.match("example"));      

  1. null

  2. Example

  3. example

  4. error

Answer: 1

var patt1 = new RegExp(/e/g);
 alert(patt1.exec("This is an Example"));   

  1. e

  2. E

  3. error

  4. 16

Answer: 1

What is the output of the below JavaScript?


var patt1 = new RegExp("e");        
alert(patt1.test("This is an example"));    

  1. false

  2. true

  3. e

  4. 11

Answer: 2

What is the output of the below JavaScript?


var bol = new Boolean();        
alert(bol);     

  1. false

  2. true

  3. error

  4. None of the above

Answer: 1
+ View questions