Unix/Lunux/Linux Mcqs Questions Set 10 Sample Test,Sample questions

Question:
After using the shared library, memory can be done free by calling

1.dlclose

2.slclose

3.lclose

4.none of the mentioned


Question:
At the time of debugging with GDB, if we just press ENTER

1.GDB will repeat the same command you just gave it

2.GDB will do nothing

3.GDB will exit

4.None of the mentioned


Question:
 If we do not specify the executable file name at the compilation time in GCC, then in linux the compiler creates executable named as

1. a.out

2.a.exe

3.x.out

4.x.exe


Question:
Command line parameters are passed by the

1.preprocessor

2.assembler

3.compiler

4.linker


Question:
For a shared library, version number is changed when

1.changes done in code make the shared library incompatible with the previous version

2.changes done in code does not make the shared library incompatible with the previous version

3.when minor number is changed

4.none of the mentioned


Question:
For debugging with GDB, the compiled program can be run by the command

1.run

2.execute

3./<filename>

4.none of the mentioned


Question:
For debugging with GDB, the file “sanfoundry” can be created with the command

1.gcc -g -o sanfoundry sanfoundry.c

2.gcc -g sanfoundry.c

3.gdb sanfoundry

4.none of the mentioned


Question:
GDB can be used for

1.c language

2.c++ language

3.both c and c++ language

4.none of the mentioned


Question:
GDB stands for

1.GNU debugger

2.General debugging breakpoint

3.General debugger

4.None of the mentioned


Question:
If a program is linked against a static library then

1.machine code of the used function is copied in the executable

2.used function definition is copied into the preprocessd code

3.used function definition is provided at the time of compiling

4.none of the mentioned


Question:
If sanfoundry.c is compiled with GCC, then the sanfoundry.s file will contain the

1.assembly code

2.machine code

3.preprocessed code

4.expanded source code


Question:
In debugging with GDB, break points can be set to

1.any line

2.any function

3.both any line and function

4.none of the mentioned


Question:
In GCC compiler, “-shared” option is given to create the shared library with

1.source files

2.object files

3.executables

4.none of the mentioned


Question:
In GDB debugging, we can proceed to the next breakpoint with command

1.next

2.continue

3.both next and continue

4.none of the mentioned


Question:
In GDB, breakpoints can be set by the command

1.break

2.b

3.both break and b

4.none of the mentioned


Question:
In linux shared libraries has the extension of

1..so

2..si

3..sl

4.none of the mentioned


Question:
In linux, shared library is a

1.text file

2.binary file

3.device file

4.none of the mentioned


Question:
In linux, the static libraries are mostly installed in

1./usr/lib

2./usr/local/lib

3.both /usr/lib and /usr/local/lib

4.none of the mentioned


Question:
In Linux, the static libraries can be created by

1.ar command

2.as command

3.ap command

4.aq command


Question:
In Linux, the static library has the extension of

1..a

2..b

3..c

4..d


Question:
In the preprocessing stage of compilation

1.header files are actually expanded and included in the source code of the program

2.macros are replaced by their respective values

3.all the comments are stripped off

4.all of the mentioned


Question:
Libraries can be linked with ____ to create executables.

1.other libraries

2.other object files

3.both other libraries and object files

4.none of the mentioned


Question:
Preprocessed files are given the file extension _____ for c++ programs.

1..i

2. .ii

3..iii

4.none of the mentioned


Question:
Shared libraries are linked with the program

1.at the time of creation of executable

2.at the run time

3.at the time of creation of executable & run time

4.none of the mentioned


Question:
Shared libraries can be shared between

1.various running programs

2.only 2 running programs

3.only 8 running programs

4.none of the mentioned


Question:
The a.out file is in the

1.ELF format

2.EXE format

3.Both EXE and ELF format

4.None of the mentioned


Question:
The archive(ar) utility in linux can

1.create a new static library

2.insert the object files into the static library

3.replace the object files into the static library

4.all of the mentioned


Question:
The assembly code is converted into the machine code by

1.compiler

2.assembler

3.linker

4.none of the mentioned


Question:
The assmebly code generated depends upon the

1.processor archietecture

2.ram size

3.both processor archietecture and RAM size

4.none of the mentioned


Question:
The COFF stands for

1.common object file format

2.combined operation for file formats

3.combined object file format

4.none of the mentioned


Question:
The command “gdb sanfoundy”

1.will start debugging for the file “sanfoundry” if the file is compiled with -g option with GCC

2.will create executable for debugging

3.will provide all errors present in the file “sanfoundry”

4.none of the mentioned


Question:
The compiler converts

1.assembly code into machine code

2.preprocessed source code into assembly code

3.machine code into assembly code

4.none of the mentioned


Question:
The correct sequence of GCC compilation process is

1.preprocessing -> compilation -> assemble -> linking

2.assemble -> preprocessing -> compilation -> linking

3.preprocessing -> assemble -> compilation -> linking

4.none of the mentioned


Question:
The library contains the

1.pre-compiled object files

2.source files

3.header files

4.none of the mentioned


Question:
The lines in our code that begin with the “#” character are

1.preprocessor directives

2.macros

3.header files

4.none of the mentioned


Question:
The macros specifies in source code are expanded by

1.preprocessor

2.assembler

3.compiler

4.linker


Question:
The object file contains the

1.assembly code

2.machine code

3.modified source code

4.none of the mentioned


Question:
The preprocessor creates the file with extension

1..a

2..i

3..s

4..o


Question:
The preprocessor removes the _______ from the source code.

1.comments

2.header files

3.both comments and header files

4.none of the mentioned


Question:
To print the value of a variable while debugging with GDB, ______ command can be used.

1.printf

2.print

3.show

4.none of the mentioned


Question:
To use the static library in the program

1.header file must be provided to in the source code

2.path for the library must be specified

3.header file must be provided to in the source code & path for the library must be specified

4.none of the mentioned


Question:
What is the role of linker in the compilation process?

1.linker links the object code with the library code

2.linker converts machine code into executable machine code

3.linker generates an executable file

4.all of the mentioned


Question:
When a program is linked with a shared library

1.only a small table is created in the executable

2.executable contains the whole content of respective .so file

3.executable contains nothing related with the shared libraries

4.none of the mentioned


Question:
Which command can be used to update the shared library system?

1.lconfig

2.ldconfig

3.slconfig

4.none of the mentioned


Question:
Which compilation step makes sure that all the undefined symbols in the code are resolved.

1.linking

2.compiling

3.preporcessing

4.none of the mentioned


Question:
Which gcc option is used to specify the library?

1.-c

2.-l

3.-a

4.-o


Question:
Which one of the following command can be used to provide executable permissions for a file?

1.chmod +x <filename>

2.chmod 777 <filename>

3.both chmod +x and chmod 777

4.none of the mentioned


Question:
Which one of the following command can list the symbols defined in a library?

1.mn

2.nm

3.nn

4.mm


Question:
Which one of the following is not true?

1.we need to manually go through all intermediate stages to generate an executable in gcc

2.gcc compilation process always contains 4 stages

3.gcc compilation process always contains 3 stages

4.none of the mentioned


Question:
Which option of GCC compiler provides the linking with shared libraries?

1.-lmylib

2.-lib

3.-mylib

4.none of the mentioned


More MCQS

  1. Unix MCQS Set 1
  2. Unix MCQS Set 2
  3. Unix MCQS Set 3
  4. Unix MCQS Set 4
  5. Linux Mcqs Questions Set 1
  6. Linux Mcqs Questions Set 2
  7. Linux Mcqs Questions Set 3
  8. Linux Mcqs Questions Set 4
  9. Linux Mcqs Questions Set 5
  10. Linux Mcqs Questions Set 6
  11. Linux Mcqs Questions Set 7
  12. Linux Mcqs Questions Set 8
  13. Linux Mcqs Questions Set 9
  14. Linux Mcqs Questions Set 10
  15. Linux Mcqs Questions Set 11
  16. Linux Mcqs Questions Set 12
  17. Linux Mcqs Questions Set 13
  18. Linux Mcqs Questions Set 14
  19. Unix MCQ Set 01
  20. Unix MCQ Set 02
  21. UNIX SYSTEM Mcq
  22. Unix MCQ
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!