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.
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 13 of 14
Explore more Topics under C Programming
int main()
{
char var='b';
printf("%d ", sizeof("a"));
printf("%d ", sizeof('b'));
printf("%d ", sizeof(10));
printf("%d ", sizeof(var));
}
//int size is 2 bytes
int main()
{
char str[]="JACKIE CHAN";
int i=0;
while(str[i] != 0)
{
printf("%c",str[i]);
i++;
}
return 0;
}
int main()
{
char str[]="ANDAMAN";
int i=0;
while(str[i] != '\0')
{
printf("%c",str[i]);
i++;
}
return 0;
}
int main()
{
char str[]="MALDIVES";
printf("%s ",str);
puts(str);
return 0;
}
int main()
{
char str[3]="SUNDAY";
printf("%s",str);
}
int main()
{
char str1[]="JAMES,";
char str2[15]="BOND ";
strcat(str2,str1);
printf("%s",str2);
printf("%s",str1);
}
int main()
{
printf("%c","HUMPTY"[2]);
}
int main()
{
char str1[] = "FIRST";
char str2[20];
strcpy(str2,str1);
printf("%s %s ",str1,str2);
printf("%d", (str1!=str2));
printf("%d", strcmp(str1,str2));
return 0;
}
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!