HPE Company Programming

file *fp;
fp=fopen("/home/ts/test.txt","r");
Which of the following code is correct about the code?
A)the code will write test.txt in /home/ts
B)the code will open test.txt for reading in text mode
C)The code will open the /home directory and create test.txt in it
D)The code will open only read only files of home directory.

Read Solution (Total 2)

HPE Other Question

an unbiased coin is tossed. if the result is a head, a pair o unbiased dice is rolled and the number of obtained is adding the numbers on two faces is noted if the result is a tail, a card from a shuffled pack of a eleven cards 2, 3, 4, ......, 12 is picked and the number on the card is noted. the probability that the noted number is either 7 or 8 is