5. How can I pad a string to a known length? Padding strings to a fixed length can be handy when you are printing fixed-length data such as tables or …
Interview Questions and Answers
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language String Interview Questions and Answers For Freshers Part-2
by Sby S3. How can I remove the leading spaces from a string? The C language does not provide a standard function that removes leading spaces from a string. It is easy, …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language String Interview Questions and Answers For Freshers Part-1
by Sby S1. 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. …
- 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 Array Interview Questions and Answers For Freshers Part-4
by Sby S7. Why can’t constant values be used to define an array’s initial size? There are times when constant values can be used and there are times when they can’t. A …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Array Interview Questions and Answers For Freshers Part-3
by Sby S5. Can you assign a different address to an array tag? No, although in one common special case, it looks as if you can. An array tag is not something …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Array Interview Questions and Answers For Freshers Part-2
by Sby S3. Can the sizeof operator be used to tell the size of an array passed to a function? No. There’s no way to tell, at runtime, how many elements are …
- C ProgrammingInterview Questions and AnswersTechnical Interview Questions and Answers
C Language Array Interview Questions and Answers For Freshers Part-1
by Sby S1. Do array subscripts always start with zero? Yes. If you have an array a[MAX] (in which MAX is some value known at compile time), the first element is a[0], …