Which of the following correctly declares and initializes a 2D array?
What is the relationship between array name and pointer in C?
If str = "Hello", what is the value of str[5]?
In a 2D array int matrix[4][5], which statement about memory layout is true?
What is the output of sizeof(arr)/sizeof(arr[0]) when arr is declared as int arr[10]?
Advertisement
Which string function modifies the original string in-place?
What happens when you try to modify a string literal in C?
What is the time complexity of inserting an element at the beginning of an unsorted array?
Which function is used to find the first occurrence of a character in a string?
What will be the output?
char arr[] = "ABC";
printf("%d", sizeof(arr));
Consider the code: int *p; int arr[5] = {10, 20, 30, 40, 50}; p = arr; What is *(p+2)?
Which of the following will correctly compare two strings?
What is the correct syntax to concatenate two strings safely in modern C?
What does the following code do?
char str[] = "HELLO";
for(int i = 0; str[i]; i++) str[i] = str[i] + 32;
Consider: char str[10]; strcpy(str, "Hello"); What is the state of memory after this?
What does strtok(str, delim) return on each call until the string ends?
What is the correct way to declare a pointer to a character array?
What happens when you try to modify a string literal in C?
char *str = "Hello";
str[0] = 'J';
Which of the following correctly reverses a string in-place?
What is the output of the following code?
char str[] = "GATE";
printf("%d", sizeof(str));