ExamVeda
Login
Home
71
What is the output of this program?
#include<stdio.h>
#include<pthread.h>
#include<fcntl.h>
 
int fd;
void *fun_t(void *arg);
void *fun_t(void *arg)
{       
    char buff[10];
    int count;
    count = read(fd,buff,10);        
    printf("%d\n",count);
    pthread_exit("Bye");
}
int main()
{
    pthread_t pt;
    void *res_t;
    fd = open("demo.c",O_RDONLY);        
    if(pthread_create(&pt,NULL,fun_t,NULL) != 0)
        perror("pthread_create");
    if(pthread_join(pt,&res_t) != 0)
        perror("pthread_join");
    return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
72
In sysfs.h which one of the following structure represents the directory entries?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
73
How do you get help about the command "cp"?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
74
Which one of the following command can list the symbols defined in a library?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
75
cat < file1 >> file2 | file3
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
76
While debugging with GDB, arguments to the program can be specified by the arguments of . . . . . . . . command.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
77
What is the output of the following program?
x = 3; y = 5; z = 10;
if [( $x -eq 3 ) -a ( $y -eq 5 -o  $z -eq 10 )]
then
    echo $x
else
    echo $y
fi
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
78
Which command identifies the resource of a command?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
79
File descriptor table indexes which kernel structure?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
80
Below is the code
int main() 
{
     int fd1, fd2;
     struct stat buff1, buff2;
     fd1 = open(“1.txt”, O_RDWR);
     fd2 = open(“2.txt”, O_RDWR | O_APPEND);
     lseek(fd1, 10000, SEEK_SET);
     write(fd1, “abcdefghij”, 10);
     write(fd2, “abcdefghij”, 10);
     fstat(fd1, &buff1);
     fstat(fd2, &buff2);
     printf(“ %d %d”, buff1.st_size, buff2.st_size);
     return 0;
}
Before running the program, the file 1.txt and 2.txt size is 20 each. What is the output?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board