Question
Consider the following C code: #include
#include int main() {   char* text = "The quick brown fox jumps over the lazy dog.";   char* pattern = "fox";   char* result = strstr(text, pattern);   if (result != NULL) {     printf("%ld\n", result - text); // Print index   } else {     printf("-1\n");   }   return 0; } What will be the output of this program?Solution
Correct Answer: A (Indices: T-0, h-1, e-2, ' '-3, q-4, u-5, i-6, c-7, k-8, ' '-9, b-10, r-11, o-12, w-13, n-14, ' '-15, f-16. So 'fox' starts at index 16.)
The position of how many letters will remain unchanged if each of the letters in the word ‘TEMPERATURE’ is re-arranged in the English alphabetical o...
If H is mother of E, who is father of B, who is sister of A, whose mother is N’s sister then how is B related to N?
Which two signs should be interchanged to make the given equation correct?
396 ÷ 2 × 4 – 217 + 74 = 935
Select the option that is related to the fifth letter-cluster in the same way as the second letter-cluster is related to the first letter cluster and th...
Select the option that is related to the third word in the same way as the second word is related to the first word.
Clay: Pottery :: Wheat : ?
Man : Mammal : : Rat : ?
Select the number from among the given options that can replace the question mark (?) in the following series.
96, 85, 76, 69, ?
In a certain code language, ‘OBLIGATE’ is coded as ‘QNAKICVG’. What is the code for ‘DOCUMENT’ in the same code language?
...Mr. AP, BP, CP, DP, EP, FP, GP and HP are in a meeting, sitting around a round table facing the centre. HP is sitting third to the left of EP. DP is sit...
In the question below some statements are given followed by three conclusions I, II and III. You have to take the given statements to be true even if t...