if you want to remove an article from website contact us from top.

    what error is generated on placing an address operator with a variable in the printf statement?

    Mohammed

    Guys, does anyone know the answer?

    get what error is generated on placing an address operator with a variable in the printf statement? from screen.

    250+ TOP MCQs on printf and Answers 2022

    C Multiple Choice Questions & Answers (MCQs) on “printf – 1”. 1. The syntax of printf() function is printf(“control string”, variable list) ;what is the

    Home » C Programming Objective Questions » 250+ TOP MCQs on printf and Answers

    250+ TOP MCQs on printf and Answers

    C Multiple Choice Questions & Answers (MCQs) on “printf – 1”.

    1. The syntax of printf() function is printf(“control string”, variable list) ;what is the prototype of the control string?

    a) %[flags][.precision][width][length]specifier

    b) %[flags][length][width][.precision]specifier

    c) %[flags][width][.precision][length]specifier

    d) %[flags][.precision][length][width]specifier

    Answer: c

    Clarification: The prototype of control string is %[flags][width][.precision][length]specifier. Each control string must begin with % sign.

    2. The parameter control string in the printf () is a C String that contains text to be __________

    a) taken from a standard output device

    b) written on to the standard output device

    c) received from the standard output device

    d) nothing can be said

    Answer: b

    Clarification: After the control string, the function can have many additional arguments as specified in the control string, this parameter contains the text to be written on to the standard output device.

    3. Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.

    a) specifier b) flags c) precision d) decimal Answer: b

    Clarification: Flags specify output justification such as Left-justify within the data given field width, Displays the data with its numeric sign, used to provide additional specifiers like o, x, X for octal, left padding of a number.

    4. What symbol is used to Left-justify within the data given field width?

    a) -(minus sign) b) +(plus sign) c) # d) 0 Answer: a

    Clarification: To left-justify the data use minus sign(-) in the flags field.

    5. What specifies the minimum number of characters to print after being padded with zeros or blank spaces?

    a) flags b) length c) width d) precision Answer: c

    Clarification: width specifies the minimum number of positions in the output.

    6. The maximum number of characters to be printed is specified by __________

    a) precision b) width c) length d) flags Answer: a

    Clarification: Precision specifies the maximum number of characters to print.

    7. ________is used to define the type and the interpretation of the value of the corresponding argument.

    a) precision b) specifiers c) flags d) decimal Answer: b

    Clarification: Specifiers is used to define the type and the interpretation of the value of the corresponding argument. Example: c for a single character, d for decimal values etc.

    8. A conversion specification %7.4f means ____________

    a) print a floating point value of maximum 7 digits where 4 digits are allotted for the digits after the decimal point

    b) print a floating point value of maximum 4 digits where 7digits are allotted for the digits after the decimal point

    c) print a floating point value of maximum 7 digits

    d) print a floating point value of minimum 7 digits where 4 digits are allotted for the digits after the decimal point

    Answer: a

    Clarification: The conversion specification %7.4f means that it will print floating point number maximum of 7 digits and 4 digits after the decimal point.

    9. Choose the correct description for control string %-+7.2f.

    a) – means display the sign, + means left justify, 7 specifies the width and 2 specifies the precision

    b) – means left justify, + means display the sign, 7 specifies the width and 2 specifies the precision

    c) – means display the sign, + means left justify, 7 specifies the precision and 2 specifies the width

    d) – means left justify, + means display the sign, 7 specifies the precision and 2 specifies the width

    Answer: b

    Clarification: The given control string %-+7.2f means that – is for left justify, + to display sign, 7 specifies the precision and 2 specifies the width.

    10. What error is generated on placing an address operator with a variable in the printf statement?

    a) compile error b) run-time error c) logical error d) no error Answer: b

    Clarification: Placing an address operator with a variable in the printf statement will generate a run-time error.

    ---- >> Below Are The Related Posts Of Above Questions :::

    ------>>[MOST IMPORTANT]<<------

    250+ TOP MCQs on printf and Answers

    250+ TOP MCQs on scanf and Answers

    250+ TOP MCQs on Formatted Output and Answers

    250+ TOP MCQs on Formatted Output and Answers

    300+ TOP PROTOTYPE Interview Questions and Answers

    250+ TOP MCQs on scanf and Answers

    250+ TOP MCQs on Processing SQL Statements and Answers

    250+ TOP MCQs on Concatenating Strings, InputBox Function and toString Method

    250+ TOP MCQs on DMA Functions, Memory Leak, Dangling Pointers and Answers

    300+ TOP Prototype JavaScript Framework Interview Questions [UPDATED]

    250+ TOP MCQs on Status Variables and Answers

    250+ TOP MCQs on The sizeof() Function and Answers

    250+ TOP MCQs on Date and Time Function and Answers

    250+ TOP MCQs on String Operations and Answers

    250+ TOP MCQs on Aggregation Mechanics and Answers

    250+ TOP MCQs on User Input and Screen Output – 2 and Answers

    स्रोत : engineeringinterviewquestions.com

    [Solved] What error is generated on placing an address operator with a variable in the printf statement?

    Home

    Bachelor of Business Administration in Computer Applications (BBA [CA])

    C Language

    What error is generated on pla...

    Q.

    What error is generated on placing an address operator with a variable in the printf statement?

    A. compile error B. run-time error C. logical error D. no error

    Answer» B. run-time error

    Report View more MCQs in

    » C Language solved MCQs

    Discussion No Comments yet

    Related questions

    The syntax of printf() function is printf(“control string”, variable list) ;what is the prototype of the controlstring?

    What error will be generated on using incorrect specifier for the datatype being read?

    Comment on the following statement n = 1; printf("%d, %dn", 3*n, n++);

    The syntax to print a % using printf statement can be done by ________

    Variable name resolution (number of significant characters for the uniqueness of variable) depends on___________

    What are the Properties of the first argument of a printf() functions?

    The parameter control string in the printf () is a C String that contains text to be __________

    For floating point numbers, the precision flag specifies the number of decimal places to be printed. When noprecision modifier is specified, printf() prints _______

    What will the given code result in printf(“\n you are\”awesome \" ");?

    What will be the output for the given code printf(“\n The number is %07d”,1212);

    स्रोत : mcqmate.com

    printf

    This set of C Multiple Choice Questions & Answers (MCQs) focuses on “printf – 1”. Pre-requisite for this C MCQ set: Advanced C Programming Video Tutorial. 1. The syntax of printf() function is printf(“control string”, variable list) ;what is the prototype of the control string? a) %[flags][.precision][width][length]specifier b) %[flags][length][width][.precision]specifier c) %[flags][width][.precision][length]specifier d) %[flags][.precision][length][width]specifier 2. The ... Read more

    C Questions and Answers – printf – 1

    « Prev Next »

    This set of C Multiple Choice Questions & Answers (MCQs) focuses on “printf – 1”.

    Pre-requisite for this C MCQ set: Advanced C Programming Video Tutorial.

    1. The syntax of printf() function is printf(“control string”, variable list) ;what is the prototype of the control string?

    a) %[flags][.precision][width][length]specifier

    b) %[flags][length][width][.precision]specifier

    c) %[flags][width][.precision][length]specifier

    d) %[flags][.precision][length][width]specifier

    view Answer

    2. The parameter control string in the printf () is a C String that contains text to be __________

    a) taken from a standard output device

    b) written on to the standard output device

    c) received from the standard output device

    d) nothing can be said

    view Answer

    Note: Join free Sanfoundry classes at Telegram or Youtube

    advertisement

    3. Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.

    a) specifier b) flags c) precision d) decimal view Answer

    4. What symbol is used to Left-justify within the data given field width?

    a) -(minus sign) b) +(plus sign) c) # d) 0 view Answer

    Take C Programming Tests Now!

    5. What specifies the minimum number of characters to print after being padded with zeros or blank spaces?

    a) flags b) length c) width d) precision view Answer

    6. The maximum number of characters to be printed is specified by __________

    a) precision b) width c) length d) flags view Answer advertisement

    7. ________is used to define the type and the interpretation of the value of the corresponding argument.

    a) precision b) specifiers c) flags d) decimal view Answer

    8. A conversion specification %7.4f means ____________

    a) print a floating point value of maximum 7 digits where 4 digits are allotted for the digits after the decimal point

    b) print a floating point value of maximum 4 digits where 7digits are allotted for the digits after the decimal point

    c) print a floating point value of maximum 7 digits

    d) print a floating point value of minimum 7 digits where 4 digits are allotted for the digits after the decimal point

    view Answer advertisement

    9. Choose the correct description for control string %-+7.2f.

    a) – means display the sign, + means left justify, 7 specifies the width and 2 specifies the precision

    b) – means left justify, + means display the sign, 7 specifies the width and 2 specifies the precision

    c) – means display the sign, + means left justify, 7 specifies the precision and 2 specifies the width

    d) – means left justify, + means display the sign, 7 specifies the precision and 2 specifies the width

    view Answer

    10. What error is generated on placing an address operator with a variable in the printf statement?

    a) compile error b) run-time error c) logical error d) no error view Answer

    Sanfoundry Global Education & Learning Series – C Programming Language.

    To practice all areas of C language, here is complete set of 1000+ Multiple Choice Questions and Answers.

    « Prev - C Programming Questions and Answers – Random Number Generation – 2

    » Next - C Questions and Answers – printf – 2

    Next Steps:

    Get Free Certificate of Merit in C Programming

    Participate in C Programming Certification Contest

    Become a Top Ranker in C Programming

    Take C Programming Tests

    Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

    Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

    Related Posts:

    Practice BCA MCQs

    Apply for Computer Science Internship

    Apply for C Internship

    Watch Advanced C Programming Videos

    Practice Computer Science MCQs

    advertisement

    Recommended Articles:

    printf Command in Linux with Examples

    C Questions and Answers – printf – 2

    C Program to Check if a String is a Palindrome without using Built-in Function

    C Programming Questions and Answers – Formatted Output – 2

    C Program to Find the Length of the String

    C Programming Questions and Answers – Formatted Output – 1

    C Program to Find All Possible Subsets of Given Length in String

    C Programming Questions and Answers – Line Input & Output – 1

    SQL Server Questions and Answers – Windowing

    C Program to Implement Binary Search with Window

    advertisement

    Additional Resources:

    C# Programs on Functions

    C# String Programs

    C Programs on Recursion

    Linked List Programs in C

    String Programs in C++

    Popular Pages:

    String Programs in C

    C Programming MCQ Questions

    Java String Programs

    C++ STL C++ Programs

    स्रोत : www.sanfoundry.com

    Do you want to see answer or more ?
    Mohammed 2 day ago
    4

    Guys, does anyone know the answer?

    Click For Answer