Vidyalelo
Computer Science · all questions

Linux
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

996

Questions

23/50

Page

Pick an option on a question to see the right answer and solution.

The command "gcc -save-temps example.c" will generate

Select an option to see the answer and solution.

. . . . . . . . timer is decremented only when the process is executing

Select an option to see the answer and solution.

Pick the run level to run Linux in multi user mode with networking?

Select an option to see the answer and solution.

What is the output of this program?
#!/bin/bash
demo_var=hello
readonly demo_var
demo_var=hi
echo $demo_var
exit 0

Select an option to see the answer and solution.

The command 'hash'

Select an option to see the answer and solution.

If we want to print the value of a variable in hexadecimal, we have to use "print" command with the option . . . . . . . . in GDB.

Select an option to see the answer and solution.

Any file's attribute information is stored in which structure on the disk

Select an option to see the answer and solution.

Solaris is the name of a flavor of UNIX from

Select an option to see the answer and solution.

There are two hard links to the "file1" say hl and h2 and a softlink sl. What happens if we deleted the "file1"?

Select an option to see the answer and solution.

The list of available frame buffers are stored in

Select an option to see the answer and solution.

What is the output of this program?
#!/bin/bash
echo "Which file do you want to check"
read x
until [ -e $x ]
do 
echo "The file does not exist. Do you want to create? y/n"
read a
if [ $a = y ]; then  
touch $x
echo "Your file has been created successfully."
fi
done
echo "The file is present in this directory"
exit 0

Select an option to see the answer and solution.

In this program the allocated memory block can store
#include<stdio.h>
#include<stdlib.h>
 
int main()
{
    int *ptr;
    ptr = malloc(10);
    return 0;
}

Select an option to see the answer and solution.

Indicate the right option to search for BOB, Bob, BOb or BoB?

Select an option to see the answer and solution.

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");
    if(sem_close(sem_id) == -1)
        perror("sem_close");
    sem_wait(sem_id);
    printf("Example\n");
    return 0;
}

Select an option to see the answer and solution.

If a and b are 2 variables then the meaning of a<<=b is

Select an option to see the answer and solution.

Which is Fastest IPC?

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
 
int main()
{
    fork();
    printf("Example\n");
    return 0;
}

Select an option to see the answer and solution.

What UNIX command is used to update the modification time of a file?

Select an option to see the answer and solution.

The print and printf statements can be told to send their output to other place except standard output, is called

Select an option to see the answer and solution.

Which file is used primarily for diagnosing memory fragmentation issues ?

Select an option to see the answer and solution.