Главная страница
Навигация по странице:

  • 1 / 1 балл

  • Правильно

  • Open Source Software


    Скачать 1.28 Mb.
    НазваниеOpen Source Software
    Дата26.05.2022
    Размер1.28 Mb.
    Формат файлаdocx
    Имя файлаFinal_OS 2.docx
    ТипДокументы
    #551026
    страница33 из 39
    1   ...   29   30   31   32   33   34   35   36   ...   39

    Compiling, Linking and Libraries




    1.


    Вопрос 1

    GCC stands for:

    1 / 1 балл



    GNU Compiler Collection



    Geneva Computation Corporation



    Great Computer Compiler



    GNU Compiler for C

    Правильно

    This is the correct answer

    2.


    Вопрос 2

    A good choice of compiler options for day-to-day use would be:

    1 / 1 балл



    gcc -M -H -O3 -E program.c



    gcc -Wall -I /tmp/include -L /tmp/lib program.c



    gcc -O2 -Wall -pedantic program.c



    gcc -O0 -Wall -ansi program.c

    Правильно

    This is a standard bit of advice

    3.


    Вопрос 3

    Why might you choose to link your program statically, rather than use a shared library version?

    1 / 1 балл



    The static program will use less memory



    The static program need not have an open source license, while the shared library version cannot be closed source



    The static program will not use new versions of shared libraries as they become available, and thus may avoid breakage and bugs



    The static program will load and execute more quickly

    Правильно

    Yes, some bugs can be avoided

    4.


    Вопрос 4

    To find the shared libraries used by /usr/bin/cp you can do (Select all answers that apply):

    1 / 1 балл



    ldd /usr/bin/cp

    Правильно

    You can run ldd directly on the executable



    ldd $(which cp)

    Правильно

    You can run ldd indirectly on the executable using which



    gcc -ldd /usr/bin/cp



    find -libso /usr/bin/cp

    5.


    Вопрос 5

    Which statements are true (Select all answers that apply):

    1 / 1 балл



    Use of shared libraries can cause bugs because the application may conflict with the new library version

    Правильно

    Unfortunately, there may be unforeseen problems and inadequate testing



    Use of shared libraries saves memory

    Правильно

    Only one copy of the library needs to be kept in memory if more than one application is using its contents



    Applications can load faster when using shared libraries

    Правильно

    If the relevant data is already in memory it need not be loaded again



    Use of shared libraries enables applications to stay up to date with new library features without being recompiled

    Правильно

    The application will automatically use the new features
    Test 7
    1   ...   29   30   31   32   33   34   35   36   ...   39


    написать администратору сайта