In the context of specialized programming considerations, what is the significance of cache locality?

In the context of specialized programming considerations, what is the significance of cache locality?A . Cache locality is not relevant in specialized programmingB . Cache locality can improve memory access performanceC . Cache locality refers to hardware-specific optimizationsD . Cache locality only affects C++ programmingView AnswerAnswer: B Explanation: Cache locality...

February 4, 2025 No Comments READ MORE +

What system call is used to change the offset of the open file in C programming?

What system call is used to change the offset of the open file in C programming?A . dprintf()B . unlink()C . lseek()D . access()View AnswerAnswer: C Explanation: The lseek() system call is used to change the offset of the open file in C programming.

January 25, 2025 No Comments READ MORE +

What function is used to concatenate two strings in C?

What function is used to concatenate two strings in C?A . strcat()B . strncpy()C . memcpy()D . strcpy()View AnswerAnswer: A Explanation: strcat() is used to concatenate two strings in C.

January 24, 2025 No Comments READ MORE +

In <stdarg.h>, what data type is used to declare a variable which represents the argument list?

In <stdarg.h>, what data type is used to declare a variable which represents the argument list?A . va_floatB . va_listC . va_intD . va_charView AnswerAnswer: B Explanation: The va_list data type is used to declare a variable representing the argument list.

January 24, 2025 No Comments READ MORE +

Which C11 keyword is used to indicate a function that never returns?

Which C11 keyword is used to indicate a function that never returns?A . _NoreturnB . _PragmaC . _AlignofD . _BoolView AnswerAnswer: A Explanation: The _Noreturn keyword in C11 is used to indicate a function that never returns control to its caller.

January 24, 2025 No Comments READ MORE +

Which type of concurrency model is used by POSIX threads (pthread) in C programming?

Which type of concurrency model is used by POSIX threads (pthread) in C programming?A . PreemptiveB . Co-operativeC . Single-threadedD . Multi-threadedView AnswerAnswer: D Explanation: POSIX threads (pthread) in C programming use a multi-threaded concurrency model.

January 20, 2025 No Comments READ MORE +

Which of the following obsolete yet valid language elements are used for trigraphs in C programming?

Which of the following obsolete yet valid language elements are used for trigraphs in C programming?A . ???B . ??!C . ?=+D . ??/View AnswerAnswer: A Explanation: Trigraphs in C programming are represented by three consecutive question marks, such as the "???" trigraph.

January 20, 2025 No Comments READ MORE +

What will be the output of the following code snippet in C: int num = 5; printf("%d", num++);

What will be the output of the following code snippet in C: int num = 5; printf("%d", num++);A . 4B . 6C . 5D . UndefinedView AnswerAnswer: C Explanation: The postfix increment operator (num++) increments the value of num after the current value is used in the printf statement.

January 20, 2025 No Comments READ MORE +

In network socket programming, which function is used to establish a connection with a remote server?

In network socket programming, which function is used to establish a connection with a remote server?A . bind()B . connect()C . listen()D . accept()View AnswerAnswer: B Explanation: The connect() function is used to establish a connection with a remote server in network socket programming.

January 19, 2025 No Comments READ MORE +