Multiple choice technology programming languages

Find out the error in the following code? Libname output_dir “c:\mydocuments\output”; Data output_dir.test; Infile datalines dlm=’,’; Input name $ total; If total > 50; Datalines; Sharma,50 Thiyaga,90 Ashok,60 Run;

  1. No Errors

  2. Error in the LIBNAME Statement

  3. Error in the Datalines statement

  4. Error in the infile statement

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The LIBNAME statement uses Windows-style backslashes without proper escaping. In SAS, backslashes are escape characters, so 'c:\mydocuments\output' should be written as 'c:\mydocuments\output' or use forward slashes 'c:/mydocuments/output'. The rest of the code is syntactically correct.