OA. free
Free
Palo Alto Networks Core Computer Science Core Computer Science Medium

Select only one of the following

Palo Alto Networks technical mcq question, verified with a worked answer. Free to practise - no sign-up.

int main()
{
    char n[5][5]={"tom","ram","nitin","arjun","sita"};
    printf("%s",strcat(name[1],name[2]));
    return 0;
}

Select only one of the following

Choose one option.
Show answer & explanation
Answer: D. D) error

The array was declared as 'n', but strcat uses 'name', which is an undeclared identifier, resulting in a compilation error.

Step-by-step Derivation:
Step 1: Look at the declaration: char n[5][5] = ...;
Step 2: Look at the usage: strcat(name[1], name[2]);
Step 3: 'name' is not defined, so the compiler raises an undeclared identifier error.