Q381
Open question#include<stdio.h>
#include<sys/types.h>
#include<sys/socket.h>
int main()
{
int fd;
fd = socket(AF_UNIX,SOCK_STREAM,0);
printf("%d\n",fd);
return 0;
}Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
996
Questions
20/50
Page
Pick an option on a question to see the right answer and solution.
Q381
Open question#include<stdio.h>
#include<sys/types.h>
#include<sys/socket.h>
int main()
{
int fd;
fd = socket(AF_UNIX,SOCK_STREAM,0);
printf("%d\n",fd);
return 0;
}Select an option to see the answer and solution.
Q382
Open questionSelect an option to see the answer and solution.
Q383
Open questionSelect an option to see the answer and solution.
Q384
Open question#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
int main()
{
int fd;
fd = open("test.c",O_RDWR|O_APPEND);
write(fd,"/* Linux */",11);
return 0;
}Select an option to see the answer and solution.
Q385
Open questionos = Unix
[$osName = UnixName] && exit 2
[${os}Name = UnixName] && exit 3Select an option to see the answer and solution.
Q386
Open question#include<stdio.h>
#include<pthread.h>
void *fun_t(void *arg);
void *fun_t(void *arg)
{
printf("%d\n",a);
pthread_exit("Bye");
}
int main()
{
int a;
pthread_t pt;
void *res_t;
a = 10;
if(pthread_create(&pt,NULL,fun_t,NULL) != 0)
perror("pthread_create");
if(pthread_join(pt,&res_t) != 0)
perror("pthread_join");
return 0;
}Select an option to see the answer and solution.
Q387
Open question#!/bin/bash
echo "How many times you want to print 'Example'"
read value
for ((i=0;i<$value;i++))
do
echo "Example";
done
exit 0Select an option to see the answer and solution.
Q388
Open questionSelect an option to see the answer and solution.
Q389
Open questionSelect an option to see the answer and solution.
Q390
Open question#include<stdio.h>
#include<fcntl.h>
int main()
{
int fd;
char buff[512];
if( mkfifo("/tmp/test_fifo",0666) == -1)
perror("mkfifo");
fd = open("/tmp/test_fifo",O_RDONLY);
read(fd,buff,512);
printf("%s\n",buff);
return 0;
}Select an option to see the answer and solution.
Q391
Open questionSelect an option to see the answer and solution.
Q392
Open questionSelect an option to see the answer and solution.
Q393
Open questionSelect an option to see the answer and solution.
Q394
Open question#! /usr/bin/awk -f
BEGIN {
print "20"<"9" ? "true":"false"
}Select an option to see the answer and solution.
Q395
Open question#! /usr/bin/awk -f
#This filename is text.awk
BEGIN {
print FILENAME
}Select an option to see the answer and solution.
Q396
Open questionSelect an option to see the answer and solution.
Q397
Open questionSelect an option to see the answer and solution.
Q398
Open question#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char *ptr;
printf("%p\n",ptr);
ptr = (char *)malloc(sizeof(char));
printf("%p\n",ptr);
return 0;
}Select an option to see the answer and solution.
Q399
Open questionSelect an option to see the answer and solution.
Q400
Open questionSelect an option to see the answer and solution.