SAS Base Exam Certification Practice Exam 2025 - Free SAS Base Practice Questions and Study Guide

Question: 1 / 400

Which function would you use to convert a numeric variable to a character variable?

PUT function

The PUT function is the proper choice for converting a numeric variable to a character variable in SAS. It allows you to format the numeric data as desired while creating a character representation of it.

When you use the PUT function, you can specify a format that determines how the numeric value should be displayed. For instance, if you had a numeric variable representing a dollar amount, you could use the PUT function with a currency format to ensure that the output appears with the appropriate symbols and decimal places. This is particularly useful when you want to include numeric values in reports or concatenate them with other character strings.

In contrast, the INPUT function is used to read data from character strings and convert it into numeric variables, which would not fulfill the requirement of converting from numeric to character. Functions like CHAR and STR are not standard SAS functions for this type of conversion; hence they are not applicable in this context.

Get further explanation with Examzify DeepDiveBeta

INPUT function

CHAR function

STR function

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy