1. Which of the following is the right syntax to copy n characters from the object pointed to by s2 into the object pointed to by s1?
2. The isdigit function tests for any decimal-digit character.
3. which of the following function returns a pointer to the located string or a null pointer if string is not found.
4. void *memcpy(void *dest, const void *src, size_t n) What does the following code do?
5. What will be the output of the following C code?
errno = 0;
y = sqrt(-10);
if(errno == EDOM)
printf("Invalid value \n");
else
printf("Valid value\n");
errno = 0;
y = sqrt(-10);
if(errno == EDOM)
printf("Invalid value \n");
else
printf("Valid value\n");
6. This function checks whether the passed character is white-space.
7. What is the function of strcoll()?
8. isalpha() function is used to detect characters both in uppercase and lowercase.
9. Which header declares several functions useful for testing and mapping characters?
10. What will be the output of the following C code?
int i = 0;
char c;
char str[ ] = "Little Star";
while(str[i])
{
putchar (toupper(str[i]));
i++;
}
int i = 0;
char c;
char str[ ] = "Little Star";
while(str[i])
{
putchar (toupper(str[i]));
i++;
}
Read More Section(Arrays and Strings)
Each Section contains maximum 100 MCQs question on Arrays and Strings. To get more questions visit other sections.