C | String | Question 10

Last Updated :
Discuss
Comments

The Output of the following C code will be?

C
#include <stdio.h>
 
void my_toUpper(char* str, int index)
{
    *(str + index) &= ~32;
}
 
int main()
{
    char* arr = "geeksquiz";
    my_toUpper(arr, 0);
    my_toUpper(arr, 5);
    printf("%s", arr);
    return 0;
}

GeeksQuiz

geeksquiz

Compiler dependent

Runtime Error

Tags:
Share your thoughts in the comments