Description: programming languages Online Quiz - 150 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Which of the following commands will turn a scalar ($str)into an array of characters?
The value of the expression $yards += 10
What is Perl?
The $_ variable
What is the value of $match? my $txt = 'I am learning Perl'; my ($match) = $txt =~ /\s(.*)\s/;
my $val = 'x'; print ref($val); What is the output?
What will be the value of $str after execution of the following code? my $str = '112133'; $str =~ s/(.)\1/$1/g;
What will be printed? use strict; my @a = (1, 2, 3); my %b = (2 => undef); for my $val (@a) { last if $b{$val}; } print $val;
Data asthma; input city Asthma count; datalines; 1 1 35 1 0 65 2 1 40 2 0 60 3 1 25 3 0 75 ; run; proc format; value asth 0= 'No Asthma' 1= 'Asthma' ; run; Which of the following code produce the output : Asthma Frequency Percent ---------------------------------- Asthma 100 33.33 No Asthma 200 66.67
By default, PROC FREQ creates a table of frequencies and percentages for which data set variables?
When processing a FREQ procedure it is possible to run out of memory due to the fact that this procedure stores all of the value combinations in memory during processing. In order to prevent this error, try using Proc SORT to sort the data by as many variables as you can and also include those sorted variables in a BY statement in your Proc FREQ procedure. True or False?
Several SAS procedures produce frequency counts; only PROC FREQ computes chi-square tests for one-way to n-way tables and measures of association and agreement for contingency tables
Frequency distributions work best with variables that contain
Which of the following is true about Proc Freq?
Which program creates the output data set Work.Temp2? SAS Data Set Work.Temp Obs Month1 Month2 Month3 1 10 20 30 2 11 22 33 3 55 66 77 4 100 200 300 SAS Data Set Work.Temp2 Obs Month Quarter1 Quarter2 Quarter3 Quarter4 1 Month1 10 11 55 100 2 Month2 20 22 66 200 3 Month3 30 33 77 300
What will be printed when you execute the following code? class X { Y b = new Y(); X() { System.out.print("X"); } } class Y { Y() { System.out.print("Y"); } } public class Z extends X { Y y = new Y(); Z() { System.out.print("Z"); } public static void main(String[] args) { new Z(); } }
What is the result when you compile and run the following code? public class Test { public void method() { for(int i = 0; i < 3; i++) { System.out.print(i); } System.out.print(i); } }
What is the result when you compile and run the following code? public class Test { public void method() { for(int i = 0; i < 3; i++) { System.out.print(i); } System.out.print(i); } }
What is the result when you compile and run the following code? public class ThrowsDemo { static void throwMethod() { System.out.println("Inside throwMethod."); throw new IllegalAccessException("demo"); } public static void main(String args[]) { try { throwMethod(); } catch (IllegalAccessException e) { System.out.println("Caught " + e); } } }
What results from the following code? 1. class MyClass 2. { 3. void myMethod(int i) {System.out.println("int version");} 4. void myMethod(String s) {System.out.println("String version");} 5. public static void main(String args[]) 6. { 7. MyClass obj = new MyClass(); 8. char ch = 'c'; 9. obj.myMethod(ch); 10. } 11. }