adplus-dvertising

Welcome to the Strings MCQs Page

Dive deep into the fascinating world of Strings with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Strings, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Strings, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Strings. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Strings. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Strings MCQs | Page 11 of 14

Explore more Topics under C Programming

Q101.
What is the Format specifier used to print a String or Character array in C Printf or Scanf function?
Discuss
Answer: (c).%s
Q102.
What is the output of C Program with Strings?
int main()
{
    char ary[]="Discovery Channel";
    printf("%s",ary);
    return 0;
}
Discuss
Answer: (b).Discovery Channel
Q103.
What is the output of C Program with Strings?
int main()
{
    char str[]={'g','l','o','b','e'};
    printf("%s",str);
    return 0;
}
Discuss
Answer: (d).None of the above
Q104.
What is the output of C Program with Strings?
int main()
{
    char str[]={'g','l','o','b','y','\0'};
    printf("%s",str);
    return 0;
}
Discuss
Answer: (b).globe
Q105.
How do you convert this char array to string?
char str[]={'g','l','o','b','y'};
Discuss
Answer: (d).All of the above
Q106.
What is the output of C Program?
int main()
{
    int str[]={'g','l','o','b','y'};
    printf("A%c ",str);
    printf("A%s ",str);
    printf("A%c ",str[0]);
    return 0;
}
Discuss
Answer: (c).A*randomchar* Ag Ag
Q107.
What is the output of C Program with arrays?
int main()
{
    char str[]={"C","A","T","\0"};
    printf("%s",str);
    return 0;
}
Discuss
Answer: (d).Compiler error
Q108.
What is the maximum length of a C String?
Discuss
Answer: (d).None of the above
Q109.
What is the output of C program with strings?
int main()
{
    char str1[]="JOHN";
    char str2[20];
    str2= str1;
    printf("%s",str2);
    return 0;
}
Discuss
Answer: (d).Compiler error
Q110.
What is the output of C Program with arrays?
int main()
{
    char str[25];
    scanf("%s", str);
    printf("%s",str);
    return 0;
}
//input: South Africa
Discuss
Answer: (a).South

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!