Consider: int arr[10]; int *ptr = arr; What does ptr[5] represent?
What will be printed?
char str[] = "Hello";
printf("%c", *(str+2));
What is the difference between arr[5] and *arr when arr is an array?
Which statement about 2D arrays in C is correct?
What is the output?
char str[6] = {'H','e','l','l','o'};
printf("%s", str);
Advertisement
Consider a 3D array: int arr[2][3][4]. How many elements total?
What will be the result of accessing arr[10] when arr is declared as int arr[5]?
What is the difference between char str[20] and char *str in C?
What does strcpy(dest, src) do, and what is its main risk?
In a string comparison, strcmp('Apple', 'apple') returns:
What is the memory layout of a 2D array int arr[3][4] in C?
What is the output of printf("%d", sizeof(arr)) for char arr[100]?
Which function is safe to use for string concatenation with size limiting?
In C, what happens when you pass an array to a function?
What does the expression *(arr + 3) represent for an integer array?
Which of the following operations is NOT allowed on array names in C?
In a string with escape sequences like "Hello\nWorld", how many characters are counted by strlen()?
What is the output of: char str[20]; scanf("%s", str); when input is 'Hello World'?
What is the correct syntax to pass a 2D array to a function?
For char arr[5] = {'a', 'b', 'c', 'd', 'e'}, is this a valid string?