Which function is used to concatenate two strings in C?

Which function is used to concatenate two strings in C?A . strncat()B . strcpy()C . strcat()D . sprintf()View AnswerAnswer: C Explanation: strcat() is used to concatenate two strings in C.

February 8, 2025 No Comments READ MORE +

What does the strlen() function return in C?

What does the strlen() function return in C?A . The number of characters in the stringB . The index of the first occurrence of a characterC . The size of the arrayD . The length of the string including null terminatorView AnswerAnswer: D Explanation: The strlen() function returns the length...

February 7, 2025 No Comments READ MORE +

How does the use of optimized algorithms contribute to specialized programming considerations?

How does the use of optimized algorithms contribute to specialized programming considerations?A . Decreases code readabilityB . Increases code maintainabilityC . Improves code performanceD . Reduces the need for testingView AnswerAnswer: C Explanation: The use of optimized algorithms in specialized programming considerations can improve code performance by reducing execution time...

February 5, 2025 No Comments READ MORE +

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 +