Programming Questions and Answers updated daily – Computer Knowledge


Programming Questions and Answers updated daily – Computer Knowledge



137 Programming Questions and answers section with explanation for various online exam preparation, various interviews, Computer Knowledge Programming online test. Programming Questions with detailed description, explanation will help you to master the topic.

Programming Questions

1. Which of the following declaration is illegal?



SHOW ANSWER
Correct Ans:int size = 3; int array[size] = {1, 2, 3};
Explanation:


2. The elements in the array of the following code are

int array[5] = {5};



SHOW ANSWER
Correct Ans:5, 0, 0, 0, 0
Explanation:


3. Different ways to initialize an array with all elements as zero are



SHOW ANSWER
Correct Ans:All of the mentioned
Explanation:


4. Which of the following are correct syntaxes to send an array as a parameter to function:



SHOW ANSWER
Correct Ans:Both a and b
Explanation:


5. Which of the following does not initialize ptr to null (assuming variable declaration of "a" as int a=0;?



SHOW ANSWER
Correct Ans:int *ptr = &a;
Explanation:


6. Comment on the following?

const int *ptr;



SHOW ANSWER
Correct Ans:You cannot change the value pointed by ptr
Explanation:


7. Comment on the following pointer declaration?
int *ptr, p;



SHOW ANSWER
Correct Ans:ptr is a pointer to integer, p is not
Explanation:


8. The #else directive is used for



SHOW ANSWER
Correct Ans:Conditionally include source text if the previous #if, #ifdef, #ifndef, or #elif test fails
Explanation:


9. For each #if, #ifdef, and #ifndef directive.



SHOW ANSWER
Correct Ans:All of the mentioned
Explanation:


10. Which of the following sequences are unaccepted in C language?



SHOW ANSWER
Correct Ans:#if #if #endif
Explanation:


11. How is search done in #include and #include “somelibrary.h” according to C standard?



SHOW ANSWER
Correct Ans:For both, search for ‘somelibrary’ is done in implementation-defined places
Explanation:


12. Which directory the compiler first looks for the file when using #include ?



SHOW ANSWER
Correct Ans:C:COMPILERINCLUDE
Explanation:


13. #pragma exit is primarily used for?



SHOW ANSWER
Correct Ans:Running a function at exiting the program
Explanation:


14. #include are _______ files and #include “somefile.h” ________ files.



SHOW ANSWER
Correct Ans:They can include all types of file
Explanation:


15. Preprocessor feature that supply line numbers and filenames to compiler is called?



SHOW ANSWER
Correct Ans:Line control
Explanation:


16. Property which allows to produce different executable for different platforms in C is called?



SHOW ANSWER
Correct Ans:Conditional compilation
Explanation:
Conditional compilation is the preprocessor facility to produce different executable.


17. Property of external variable to be accessed by any source file is called by C90 standard as



SHOW ANSWER
Correct Ans:external linkage
Explanation:


18. What is the problem in the following declarations?
int func(int);
double func(int);
int func(float);



SHOW ANSWER
Correct Ans:All of the mentioned
Explanation:


19. Which function in the following expression will be called first?

a = func3(6) – func2(4, 5) / func1(1, 2, 3);



SHOW ANSWER
Correct Ans:Cannot be predicted.
Explanation:


20. Which of the following is the correct order of evaluation for the given expression?

a = w % x / y * z;



SHOW ANSWER
Correct Ans:% / * =
Explanation:



1...1...67


Are you seeking for good platform for practicing Programming questions in online. This is the right place. The time you spent in Fresherslive will be the most beneficial one for you.

Online Test on Programming @ Fresherslive

This page provides important questions on Programming along with correct answers and clear explanation, which will be very useful for various Interviews, Competitive examinations and Entrance tests. Here, Most of the Programming questions are framed with Latest concepts, so that you may get updated through these Programming Online tests. Programming Online Test questions are granted from basic level to complex level.

Why To Practice Programming Test questions Online @ Fresherslive?

Programming questions are delivered with accurate answer. For solving each and every question, very lucid explanations are provided with diagrams wherever necessary.

Practice in advance of similar questions on Programming may improve your performance in the real Exams and Interview.

Time Management for answering the Programming questions quickly is foremost important for success in Competitive Exams and Placement Interviews.

Through Fresherslive Programming questions and answers, you can acquire all the essential idea to solve any difficult questions on Programming in short time and also in short cut method.

Winners are those who can use the simplest method for solving a question. So that they have enough time for solving all the questions in examination, correctly without any tense. Fresherslive provides most simplest methods to answer any tough questions. Practise through Fresherslive test series to ensure success in all competitive exams, entrance exams and placement tests.

Why Fresherslive For Programming Online Test Preparation?

Most of the job seekers finding it hard to clear Programming test or get stuck on any particular question, our Programming test sections will help you to success in Exams as well as Interviews. To acquire clear understanding of Programming, exercise these advanced Programming questions with answers.

You're Welcome to use the Fresherslive Online Test at any time you want. Start your beginning, of anything you want by using our sample Programming Online Test and create yourself a successful one. Fresherslive provides you a new opportunity to improve yourself. Take it and make use of it to the fullest. GOODLUCK for Your Bright Future.


FreshersLive - No.1 Job site in India. Here you can find latest 2017 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.