Questions

MCQ . (1 Marks)

🎯

Test yourself on this topic

50 questions · timed · auto-graded

MCQ 11 Mark
Input in a program can be possible using which of the following device?
  • Keyboard
  • B
    Speaker
  • C
    Printer
  • D
    Monitor
Answer
Correct option: A.
Keyboard
View full question & answer
MCQ 21 Mark
Which of the following are useful in C language I /0 operations?
  • A
    Monitor
  • B
    Keyboard
  • C
    Mouse
  • All of the given
Answer
Correct option: D.
All of the given
d
View full question & answer
MCQ 31 Mark
Which of the following function is more appropriate for accepting a string?
  • A
    getch ( )
  • gets ( )
  • C
    getchar ( )
  • D
    getc ( )
Answer
Correct option: B.
gets ( )
b
View full question & answer
MCQ 41 Mark
While reading string using %s format specifier in scanf () _______is not required with string variable.
  • A
    ,
  • B
    %
  • C
    blank space
  • &
Answer
Correct option: D.
&
d
View full question & answer
MCQ 51 Mark
%s format specification stops its reading when ________ encounters in input.
  • A
    A numbers
  • B
    expression
  • C
    character
  • blank space
Answer
Correct option: D.
blank space
d
View full question & answer
MCQ 61 Mark
What will be the value of variable a if "computer is my favourite subject" is given as input for scanf("%s". a); ?
  • A
    computer is my favourite subject
  • B
    subject
  • C
    favourite
  • computer
Answer
Correct option: D.
computer
d
View full question & answer
MCQ 71 Mark
What will be the value of variable a, b and c if a 75.5 21 is given as input for scanf(‘%c %d %d”, &a ,&b ,&c );?
  • A
    ‘a’ 75.5
  • B
    ‘a’ 21
  • ‘a' 75 5
  • D
    ‘a’ 75 21
Answer
Correct option: C.
‘a' 75 5
c
View full question & answer
MCQ 81 Mark
What will be the value of variable a. b and c tf 243 567 is given as input for scanf("%c %3d %2d”, &a &b ,&c); ?
  • A
    2 435 67
  • 2 43 56
  • C
    243 567 2
  • D
    "2" 435 67
Answer
Correct option: B.
2 43 56
b
View full question & answer
MCQ 91 Mark
Which of the following input is wrong for scanf("%c%d %d", &a, &b, &c)?
  • a 12.45 23
  • B
    a 123 23
  • C
    a 1234 23
  • D
    a 12345 6
Answer
Correct option: A.
a 12.45 23
a
View full question & answer
MCQ 101 Mark
%L format specifier in scanfi) reads
  • A
    long real number
  • B
    short integer
  • C
    short integer
  • double long real number
Answer
Correct option: D.
double long real number
d
View full question & answer
MCQ 111 Mark
%u format specifier in scanf ( )reads_____.
  • A
    an integer
  • unsigned integer
  • C
    short integer
  • D
    long Integer
Answer
Correct option: B.
unsigned integer
b
View full question & answer
MCQ 121 Mark
______ format specification in scanf ( ) reads real numbers.
  • A
    %f
  • B
    %c
  • C
    %g
  • All of the given
Answer
Correct option: D.
All of the given
d
View full question & answer
MCQ 131 Mark
_______ format specification in scanf ( ) reads a long integer.
  • A
    %d
  • B
    %f
  • %ld
  • D
    %L
Answer
Correct option: C.
%ld
c
View full question & answer
MCQ 141 Mark
In scanf ( ). & is not required while reading _______.
  • A
    Integer
  • B
    float
  • C
    character
  • string
Answer
Correct option: D.
string
d
View full question & answer
MCQ 151 Mark
%s format specifier in scanf ( ) reads a_______.
  • A
    character
  • string
  • C
    short integer
  • D
    long Integer
Answer
Correct option: B.
string
b
View full question & answer
MCQ 161 Mark
%lf format specification in scanf ( ) reads a _______.
  • A
    long integer
  • long double real number
  • C
    double real number
  • D
    real number
Answer
Correct option: B.
long double real number
b
View full question & answer
MCQ 181 Mark
_______ format specifier in scanf ( ) represents real (float) data type.
  • A
    %f
  • B
    %e
  • C
    %g
  • All of the given
Answer
Correct option: D.
All of the given
D
View full question & answer
MCQ 211 Mark
_______ format specifier in scanf ( ) reads a decimal integer.
  • A
    %c
  • %d
  • C
    %s
  • D
    %u
Answer
Correct option: B.
%d
b
View full question & answer
MCQ 221 Mark
The input data items must match with the control specifications of _______in order and data types.
  • A
    gets ( )
  • B
    %
  • scanf ( )
  • D
    getchar ( )
Answer
Correct option: C.
scanf ( )
c
View full question & answer
MCQ 241 Mark
What does p represents in %Ip?
  • data type
  • B
    parameter
  • C
    pointer
  • D
    D variable
Answer
Correct option: A.
data type
a
View full question & answer
MCQ 271 Mark
In scanf ( )statement, the general format of control string is _______.
  • A
    / Ip
  • B
    +lp
  • %ip
  • D
    -Ip
Answer
Correct option: C.
%ip
c
View full question & answer
MCQ 281 Mark
In scanf ( ) statement each formal must be preceded by_______ sign.
  • A
    /
  • %
  • C
    !
  • D
    % s
Answer
Correct option: B.
%
b
View full question & answer
MCQ 311 Mark
The _______ specifies the order in which variable values appear in the input.
  • A
    A Input string
  • B
    control string
  • C
    C format string
  • B or C
Answer
Correct option: D.
B or C
d
View full question & answer
MCQ 321 Mark
In C, each variable is identified by its name as well as ______ in scanf ( ) statement.
  • A
    #
  • B
    <
  • &
  • D
    >
Answer
Correct option: C.
&
c
View full question & answer
MCQ 331 Mark
Which of the following is formatted Input function?
  • A
    getchart
  • B
    getche
  • C
    printf
  • scanf
Answer
Correct option: D.
scanf
d
View full question & answer
MCQ 341 Mark
Which of the following function reads a character without using a standard Input device?
  • A
    getchar( )
  • B
    getch ( )
  • getc
  • D
    gets ( )
Answer
Correct option: C.
getc
c
View full question & answer
MCQ 351 Mark
The______ function will read characters until a new line character is entered by the user.
  • A
    getchar ( )
  • B
    getc ( )
  • gets ( )
  • D
    gewords( )
Answer
Correct option: C.
gets ( )
c
View full question & answer
MCQ 371 Mark
In C, strings are enclosed within _________.
  • A
    ‘ ‘(single quotes)
  • “ “ (double quotes)
  • C
    <>
  • D
    round brackets
Answer
Correct option: B.
“ “ (double quotes)
b
View full question & answer
MCQ 381 Mark
_______function reads a character from a file instead of the standard input device.
  • A
    A getfc ( )
  • B
    getch ( )
  • getc ( )
  • D
    gets ( )
Answer
Correct option: C.
getc ( )
c
View full question & answer
MCQ 391 Mark
_______ function is used when the user don't want to show a character typed in by him on the screen.
  • A
    getc ( )
  • B
    getst ( )
  • getch ( )
  • D
    getchar ( )
Answer
Correct option: C.
getch ( )
c
View full question & answer
MCQ 401 Mark
With _______ function, the character keyed in will not be echoed on the screen.
  • A
    getc ( )
  • getch ( )
  • C
    gets ( )
  • D
    getchar ( )
Answer
Correct option: B.
getch ( )
b
View full question & answer
MCQ 411 Mark
When _______function is encountered, the program will wait for the user to press enter key after giving the required character as input.
  • A
    getc ( )
  • getchar ( )
  • C
    gets ( )
  • D
    getch ( )
Answer
Correct option: B.
getchar ( )
b
View full question & answer
MCQ 421 Mark
One of the simplest way to read a character in a C program at runtime is to use the _____function.
  • A
    getc ( )
  • B
    getch ( )
  • C
    getche ( )
  • getchar ( )
Answer
Correct option: D.
getchar ( )
d
View full question & answer
MCQ 431 Mark
_______means standard input-output header file.
  • A
    stdio.hf
  • stdio.h
  • C
    sioh.f
  • D
    none of the given
Answer
Correct option: B.
stdio.h
b
View full question & answer
MCQ 441 Mark
It is not necessary to include stdio.h file while using function.
  • A
    printf ( )
  • B
    getchar ( )
  • C
    putchart ( )
  • scanf ( )
Answer
Correct option: D.
scanf ( )
d
View full question & answer
MCQ 451 Mark
Which of the following statement informs the compiler to find stdio.h file and place its content in the beginning of C program?
  • A
    # compare <stdio.h>
  • B
    # compile <stdio.h>
  • #include <stdio.h>
  • D
    None of the given
Answer
Correct option: C.
#include <stdio.h>
c
View full question & answer
MCQ 461 Mark
Which of the following file contains various input and output operations related functions?
  • A
    A math h
  • stdio.h
  • C
    conto.h
  • D
    string h
Answer
Correct option: B.
stdio.h
b
View full question & answer
MCQ 471 Mark
A variable can be given input using _______In a C program.
  • assignment operator
  • B
    bitwise operator
  • C
    special operator
  • D
    ternary operator
Answer
Correct option: A.
assignment operator
a
View full question & answer
MCQ 491 Mark
Output means____.
  • A
    to read data from any input devices like keyboard, disk, et
  • to write data to output devices like monitor. printers, et
  • C
    both A and B
  • D
    none of the given
Answer
Correct option: B.
to write data to output devices like monitor. printers, et
b
View full question & answer
MCQ 501 Mark
Input means________.
  • to read data from any input devices like keyboard, disk, et
  • B
    to write data to output devices like monitor, printers, et
  • C
    both A and B
  • D
    none of the given
Answer
Correct option: A.
to read data from any input devices like keyboard, disk, et
a
View full question & answer
MCQ . (1 Marks) - Computer STD 10 Questions - Vidyadip