BOI #2

A creative illustration of a programmer analyzing code and various programming concepts, with visual elements representing pointers, fun<wbr>ctions, and operating systems, in a colorful and engaging style.

C Programming Proficiency Quiz

Test your knowledge of C programming concepts with our engaging quiz! This quiz consists of 10 multiple-choice questions that cover various aspects of pointers, functions, expressions, and operating systems related to C programming.

Whether you are a student aspiring to master C or a seasoned programmer looking to refresh your skills, this quiz is designed for you. Key features:

  • 10 challenging questions
  • Instant feedback on answers
  • Track your progress and improvement
10 Questions2 MinutesCreated by CodingNinja42
Pointers in C DO NOT have the property:
A pointer variable holds the beginning address of a heap object(dynamically allocated variable or memory region)
A way to initialize a pointer variable is calling the library functions calloc, malloc or realloc
Pointers may be set as arguments to functions and returned from them
To declare a pointer variable one must specify a datatype followed by *, a pointer name and optionally initial value
Functions in C have the property:
A function may make its results available to the caller only by returning them with the return statement
A function is not allowed to access or modify external variables, but is allowed to obtain them as arguments
The variables declared inside a function block may exist before the function is started and after it’s terminated
The type of a pointer to a function is based only on function parameter types
Expressions in C have the property:
The relational operators have higher precedence than arithmetic operators
Additive operators have higher precedence than miltiplicative operators
Most operators have left-to-right associativity, which means they associate with the argument to the left
Expressions can contain function calls, but not recursive
Input/output operations in C have the property:
When a C program is started, the operating system opens three files and provides stdin, stdout and stderr pointers to facilitate input/output operations
Fread and fwrite functions are used to facilitate memory-oriented input/output
Printf and scanf are more general functions than fprintf and fscanf
To seperate values read in text mode one may use spaces, tabulations, new lines, comma and period characters
Input/output operations in C have the property:
They are part of the language (no library is required to use them)
Fscanf and fprintf functions are used to facilitate memory-oriented input/output
Instead of using printf and scanf one may use fprintf and fscanf with additional parameter stdout and stdin, respectively
File input/output in text mode is usually faster than in binary mode
Operating system processes DO NOT have the property:
Inter-process communication in message passing model requires kernel intervention and therefore is slower than a shared memory model
A program becomes a process when an executable file is loaded into memory, creating several sections (code, data, stack, heap –possibly) and acquiring resources (files, registers)
The child process is always a duplicate of the parent process (it’s impossible to exchange its code and data)
A crash of a parent process does not result in killing all of its children
Operating system precesses have the property:
Inter-process communication in shared memory model requires kernel intervention not only to establish shared-memory regions, but also to perform actual data interchage
A program becomes a precoess when an executalbe file is loaded into memory, creating several sections (code, data, stack, heap – possible) and acquiring resources (files, registers)
The child process is always a duplicate of the parent process (it’s impossible to exchange its code and data)
A crash of a parent process results in killing immediately all of its children
Operating system threads DO NOT have the property:
A thread entry function on Unix/Linux is declared void *fun(void *args);
Threads of a process share a data section, stack and heap, as well as registers
A crash of a thread results in terminating all the threads of the process
Condition variables are used for sending signals between threads of a process and are used together with mutexes
Operating system threads have the property:
A thread entry function in Unix/Linux is declared int main(int argc, char *argv[]);
Creating a thread requires more time and resources than creating a programs
Threads of a process share a data section, stack and heap, as well as registers
Condition variables are used for sending signals between threads of a process and are used together with mutexes
The code below implements a part of:
int I, j, key;
for (j=1; j<len; j++) { key=A[j];
i=j-1;
while (i>=0 && A[i]>key) { A[i+1]=A[i];
i=i-1;
}
A[i+1]=key;
}
Heap sort algorithim
Merge sort algorithim
insertion sort algorithim
quick sort algorithim
{"name":"BOI #2", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of C programming concepts with our engaging quiz! This quiz consists of 10 multiple-choice questions that cover various aspects of pointers, functions, expressions, and operating systems related to C programming.Whether you are a student aspiring to master C or a seasoned programmer looking to refresh your skills, this quiz is designed for you. Key features:10 challenging questionsInstant feedback on answersTrack your progress and improvement","img":"https:/images/course8.png"}
Powered by: Quiz Maker