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 is the correct way to declare and initialize a string in C?
What does the expression *(arr + 3) represent for an integer array?
Advertisement
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 relationship between pointer arithmetic and array indexing in C?
What potential issue exists with this code: char *ptr = "Hello"; ptr[0] = 'h';?
For a 3D array int arr[2][3][4], what is arr[1][2][3] equivalent to?
What is the output of: int arr[] = {10, 20, 30}; printf("%d", *(arr+1));?
In string handling, what is the difference between fgets() and gets()?
What will be the size in bytes of int arr[5] on a 32-bit system?
Which of the following correctly declares a pointer to an array (not array of pointers)?
What is the output of: char str[20]; scanf("%s", str); when input is 'Hello World'?
In what scenario would you use memcpy() instead of strcpy()?
What is the correct syntax to pass a 2D array to a function?
What does the strspn() function do?
For char arr[5] = {'a', 'b', 'c', 'd', 'e'}, is this a valid string?
Consider the following code:
char str[] = "HELLO";
int len = 0;
while(str[len] != '\0') {
len++;
}
printf("%d", len);
What will be the output?