GATE Computer Science (CS) 2017 Shift 1 Solved Paper
© examsiri.com
Question : 63 of 65
Marks:
+1,
-0
Consider the following C program.
Recall that strlen is defined in string. h as returning a value of type size_t, which is an unsigned int. the output of the program is ______.
#include <stdio.h>
#include <string.h>
void printlength (char *s, char *t) {
unsingned int c = 0;
int len = ((strlen(S) – strlen(t)) > c) ? strlen(S) : strlen(t); printf(“%d\n”, len);
}
void main () {
char *x = “abc”;
char *y = “defgh”;
printlenght (x, y);
}Recall that strlen is defined in string. h as returning a value of type size_t, which is an unsigned int. the output of the program is ______.
- Your Answer:
Go to Question: