GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

C Programming

John Jackson 76 Fragen

Quiz starten

Fragen in diesem Quiz (76)

  1. 1Object files can only have one function per file.
    1. ARichtig
    2. BFalsch
  2. 2To create a relocatable object library archive from a group of object files, enter the command:
    1. Alink library file.a object file(s)
    2. Bar ras libraryfile.a objectfile(s)
    3. Cranlib library file.a objectfile(s)
    4. Dzip -r library file.a objectfile(s)
  3. 3You should put code you expect to reuse in other programs into a header file.
    1. ARichtig
    2. BFalsch
  4. 4Dynamically linked object files have the extension .dll in Linux.
    1. ARichtig
    2. BFalsch
  5. 5If you include code in a header file, it will:
    1. Abe copied redundantly in every object file created from source that includes the header.
    2. BAll are correct.
    3. Ccause a compile error because code, other than declarations, cannot be in a header file.
    4. Dcreate more compact code because it will compile directly with the source instead of being linked from a library.
  6. 6The GCC command line parameter '-c' tells the compiler to:
    1. Acompile only, without linking any code.
    2. Buse C syntax as opposed to C# or C++ syntax.
    3. Ccopy the source file into the object file.
    4. Dcompress the code output.
  7. 7Function declarations, global variable declarations, and #define directives are good to include in a library's header file because:
    1. AAll are correct.
    2. BThey provide an interface to the library's functions and data
    3. CThey prevent you from having to expose private code or write 'getters' and 'setters' for the library code.
    4. DThey can then be used by any code that includes the header file.
  8. 8The directive #define PI 3.1415
    1. Atells the compiler to make the variable PI equal to 3.1415
    2. Btells the compiler to alter all instances of PI in the object code to 3.1415
    3. Ctells the compiler to substitute the float number 3.1415 in the source wherever it encounters the string "PI".
    4. Dtells the compiler to substitute the string "3.1415" in the source wherever it encounters the string "PI".
  9. 9If a library file containing 10 functions is statically linked at compile time instead of dynamically linked at runtime:
    1. Athe statement makes no sense because linking only occurs at compile time.
    2. Bthe executable will be smaller but the space used at runtime will be the same.
    3. Cit can share the library functions with other programs, saving space.
    4. Dthe statement makes no sense because linking only occurs at runtime.
  10. 10#include "mycode.h" directs the compiler to search for mycode.h in the current directory first. Depending on implementation, it may also search subdirectories of the current directory and the systems include path.
    1. ARichtig
    2. BFalsch

Informationen

Beschreibung
Computer Science Quiz am C Programming, erstellt von John Jackson am 16/10/2019.
Sprache
English
Aufrufe
2
Schlagwörter
computer science
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck