TOTAL QS = 20Time [ 00 : 00 : 00 ]
00:00:00

C Programming Basics Tutorial - Console IO, Formatted Output and Format Specifiers - Online Test 1

Instructions

Total Questions: 20

Total Minutes: 20

This ExamTray Free Online Exam or MCQ Quiz tests your C Programming Skills on C Console IO, Formatted Output and Format Specifiers. Examples are given as questions and answers. Easily Attend Competitive Exams and Job Interview Questions.

Go through C Theory Notes on Console IO and Formatted IO before attempting this test.

All the Best

Challenge SCORE

0 / 20

Take This Exam
1) What is an Escape Sequence in C language.?
2) Choose a correct statement about C Escape Sequences.
3) Choose a correct statement about C Escape Sequences.
4) Choose a correct statement about C Escape Sequences.
5) What is a format specifier in C language.?
6) Choose a valid C format specifier.?
7) Choose a correct statement about C format Specifiers.
8) Choose a correct statement about format specifiers.
9) What does C format specifier %W.D represent.?
10) Choose a C Formatted Input Output function below.
11) Choose a C unformatted input output function below.
12) What is the output of C program.?
int main()
{
    int a=123;
    printf("*%06d*",a);
    return 0;
}
13) What is the output of C program.?
int main()
{
    int a=123456;
    printf("*%03d*",a);
    return 0;
}
14) What is the output of C program.?
int main()
{
    int a=6543;
    printf("*%5d,*%-5d*",a,a);
    return 0;
}
15) What is the output of C program.?
int main()
{
    float a=654.123456f;
    printf("%3.3f,%3.2f",a,a);
    return 0;
}
16) What is the output of C program.?
int main()
{
    char str[]="123";
    printf("*%4s*%-4s*",str,str);
    return 0;
}
17) Choose a correct statement about sprintf and sscanf functions.?
char str[20];
18) What is the output of C program.?
int main()
{
    char ch='A';
    ch=getchar();
    putchar(ch);
    return 0;
}//input= S
19) Choose a correct C statement.?
20) What is the output of c program with %* operator.?
int main()
{
    char kh;
    scanf("%*c %c",&kh);
    putchar(kh);
    return 0;
}//input=G H
Certification Group ID
3864

Open Certification Helper Popup Reset Popup