1. What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used? The strcpy() function is designed to work exclusively with strings. …
Questions and Answers
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Functions Interview Questions and Answers For Freshers Part-3
by Sby S9. Is using exit() the same as using return? No. The exit() function is used to exit your program and return control to the operating system. The return statement is …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Functions Interview Questions and Answers For Freshers Part-2
by Sby S5. Should a function contain a return statement if it does not return a value? In C, void functions (those that do not return a value to the calling function) …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Functions Interview Questions and Answers For Freshers Part-1
by Sby S1. When should I declare a function? Functions that are used only in the current source file should be declared as static, and the function’s declaration should appear in the …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Data Files Interview Questions and Answers For Freshers Part-3
by Sby S9. How do you list a file’s date and time? A file’s date and time are stored in the find_t structure returned from the _dos_findfirst() and_dos_findnext() functions. The date and …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Data Files Interview Questions and Answers For Freshers Part-2
by Sby S5. Can stdout be forced to print somewhere other than the screen? Although the stdout standard stream defaults to the screen, you can force it to print to another device …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Data Files Interview Questions and Answers For Freshers Part-1
by Sby S1. If errno contains a nonzero number, is there an error? The global variable errno is used by many standard C library functions to pass back to your program an …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Preprocessors Interview Questions and Answers For Freshers Part-3
by Sby S9. Is it better to use a macro or a function? The answer depends on the situation you are writing code for. Macros have the distinct advantage of being more …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Preprocessors Interview Questions and Answers For Freshers Part-2
by Sby S5. What is the benefit of using #define to declare a constant? Using the #define method of declaring a constant enables you to declare a constant in one place and …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Preprocessors Interview Questions and Answers For Freshers Part-1
by Sby S1. What is a macro, and how do you use it? A macro is a preprocessor directive that provides a mechanism for token replacement in your source code. Macros are …