C interview questions are given with the answers in this website. We have given C interview questions faced by freshers and experienced in real interviews in IT industries. Users are welcome to suggest or add any other questions and answers related to C interview questions. Click on each questi...
25. Explain the difference between Type Casting and Type Conversion in C with examples? Typecasting is done to convert a data type into another data type. It is an explicit conversion as it is done by the user. float a = 6.5; int b = (int)a; // b is now 6 Type Conversion is a...
C Bitwise Operators This section contains C aptitude questions on bit manipulations using bitwise operators like bitwise OR, bitwise AND, bitwise XOR etc. Cast Type This section contains questions on type casting, how type cast performs in c programming languages? If else This section contains Apt...
25. Based on Type Casting, which of these conversions is lossy or invalid?Character -> Float Float -> Long Short -> Integer Integer -> DoubleAnswer: B) Float -> LongExplanation:Float - > Long is not a valid type casting. [Refer diagram given here: Scala Type Casting]...
27. What is the purpose of printf() and scanf() in C Program? Answer:printf() is used to print the values on the screen. On the other hand, scanf() is used for scanning values. Both printing and scanning require an appropriate datatype format specifier. As an example, ...
Great job on the initial implementation, and with these refinements, it will be even better! Consider creating separate mapper functions for each question type to ensure type safety and make the code more modular. This approach will make it easier to maintain and extend the functionality in the...
10. What is the result of logical or relational expression in C? a) True or False b) 0 or 1 c) 0 if an expression is false and any positive number if an expression is true d) None of the mentioned View Answer 11. Which of the following typecasting is accepted by C language?
146. What is type casting?Type casting means treating a variable of one type as though it is another type.147. Describe life cycle of thread?A thread is a execution in a program. The life cycle of a thread include −Newborn state Runnable state Running state Blocked state Dead state148...
Q) What is Type casting in Java? When we assign a value of one data type to the different data type then these two data types may not be compatible and needs a conversion. If the data types are compatible (for example assigning int value to long) then java does automatic conversion and...
46. What is typecasting? 47. What is the #undef preprocessor? 48. Can you differentiate between the macros and the functions? 49. What do you know about the evolution of the C language? 50. Is it possible to recover the source code of a compiled C program? 51. Change an intiger ...