What is the difference between a process and a thread in terms of resource allocation?
What is the difference between a process and a thread in terms of resource allocation?A . Processes and threads have no difference in terms of resource allocation.B . Processes have their own memory space and resources, while threads share the same memory space and resources.C . Processes and threads cannot...
What does the function accept () do in network socket programming?
What does the function accept () do in network socket programming?A . Listens for incoming connectionsB . Establishes a connection with a serverC . Sends data to a clientD . Accepts a connection request and creates a new socket for communicationView AnswerAnswer: D Explanation: The accept () function accepts a...
Which data type in C has the largest size?
Which data type in C has the largest size?A . longB . floatC . doubleD . intView AnswerAnswer: C Explanation: The double data type in C typically has a larger size than int, long, or float.
What is the purpose of using memory alignment techniques in specialized programming considerations?
What is the purpose of using memory alignment techniques in specialized programming considerations?A . Memory alignment is a security measure against buffer overflowsB . Memory alignment is exclusively used in high-level languagesC . Memory alignment is used to optimize data access and improve performanceD . Memory alignment techniques have no...
When working with specialized programming considerations in C, what is a common method used to optimize code for performance?
When working with specialized programming considerations in C, what is a common method used to optimize code for performance?A . Compiler optimizationB . Loop unrollingC . Function inliningD . Parallel processingView AnswerAnswer: C Explanation: Function inlining is a common method used to optimize code for performance by replacing a function...
In programming languages, what do function declarations refer to?
In programming languages, what do function declarations refer to?A . The function's execution runtimeB . The data types of function arguments and return valueC . The number of statements inside a functionD . The function's memory addressView AnswerAnswer: B Explanation: Function declarations in programming languages specify the data types of...
Which of the following C standards introduced the _Bool keyword for boolean data types?
Which of the following C standards introduced the _Bool keyword for boolean data types?A . C11B . C89C . C99D . C95View AnswerAnswer: A Explanation: C11 introduced the _Bool keyword for boolean data types.
Which function is used to accept a connection from a client in socket programming?
Which function is used to accept a connection from a client in socket programming?A . recv()B . send()C . connect()D . accept()View AnswerAnswer: D Explanation: The "accept" function is used to accept a connection from a client in socket programming.
Which C11 keyword is used to define boolean data types in the C programming language?
Which C11 keyword is used to define boolean data types in the C programming language?A . _AlignasB . _NoreturnC . _BoolD . __func__View AnswerAnswer: C Explanation: The _Bool keyword in C11 is used to define boolean data types in the C programming language.
Which header file should be included in a C program to use the pow() function for calculating powers?
Which header file should be included in a C program to use the pow() function for calculating powers?A . <math.h>B . <stdio.h>C . <time.h>D . <stdlib.h>View AnswerAnswer: A Explanation: The pow() function for calculating powers is included in the math.h header file in C.