Mascot Previous Years Solved Sample Placement Papers
-
The XSLT processor copies the elements of the stylesheet until it finds a command in the format:
A: SELECT ... FROM ... WHERE.
B: {item, action}.
C: {for-each select}.
D: <HTML>...</HTML>.
Ans: B -
What will be the output of the program?
A: 9
B: 0
C: 90.000000
D: 90
Ans: C -
How many times the while loop will get executed if a short int is 2 bytes wide?
A: Infinite times
B: 255 times
C: 256 times
D: 254 times
Ans: B -
How can you sort the elements of the array in descending order?
What will be the output of the program?
A: 2, 8
B: 4, 8
C: 2, 4
D: 4, 12
Ans: D -
Find the output of the following code?
Ans: A51ANvoid main() { void *ptr; char *a = 'A'; char *b = "TAN"; int i = 50; ptr = a; ptr = (*char)malloc(sizeof(a)); printf("%c", *ptr); ptr = i; ptr = (*int)malloc(sizeof(i)); printf("%d", ++(*ptr)); ptr = b; ptr = (*char)malloc(sizeof(b)); printf("%c", ++(*ptr)); }
-
What will be the output of the program if the array begins at 1200 in memory?
#include <stdio.h> int main() { int arr[] = {2, 3, 4, 1, 6}; printf("%u, %u, %u\n", arr, &arr[0], &arr); return 0; }
A: 1200, 1202, 1204
B: 1200, 1200, 1200
C: 1200, 1204, 1208
D: 1200, 1202, 1200
Ans: B