ExamVeda
Login
Home
91
What is the output of this program?
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
 
int main()
{
    int fd;
    char *buff;
    buff = (char *)malloc(sizeof(char)*5);
    fd = open("example.txt",O_RDWR|O_CREAT); 
    write(fd,"Linux",5);
    read(fd,buff,5);
    printf("%s\n",buff);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
92
Which is an example for block special file?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
93
/proc/partitions contains
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
94
What is the output of this program?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>                              
 
int main()
{
    int ptr;
    ptr = (int)malloc(sizeof(int)*10);
    return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
95
Which of the following commands can be used to copy files across systems?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
96
What is the output of this program?
#include<stdio.h>
#include<fcntl.h>
 
int main()
{
     int fd, fd2, ret;
     fd = open("hello.c",O_RDONLY);
     ret = close(fd2);
     printf("%d\n",ret);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
97
Which option is used by sed to specify that the following string is an instruction or set of instructions?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
98
What is the output of this program?
#include<stdio.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<semaphore.h>
 
int main()
{
    sem_t* sem_id;
    sem_id = sem_open("sem_value",O_CREAT,0666,0);
    if(sem_id == SEM_FAILED)
        perror("sem_open");
    sem_post(sem_id);
    printf("Example\n");
    if(sem_close(sem_id) == -1)
        perror("sem_close");
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
99
what is the output if the who command displays like this
who | cut –d ” ” -f1
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
100
The command "sed -n '/example/p' old.txt" will
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board