C Programming MCQ - Pointers

6:   A pointer variable can be
A. Passed to a function
B. Changed within a function
C. Returned by a function
D. Can be assigned an integer value
 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



7:   a→b is syntactically correct if
A. a and b are structures
B. a is structure and b is a pointer to a structure
C. a is a pointer to a structure and b is a structure
D. None of these
 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



8:  

The statement 

 if ( myPtr != NULL )
         *myPtr = NULL;
else
         *myPtr = NULL;


has the same effect as the statements(s)

A.

if(myPtr) *myPtr = NULL;
    else *myPtr = NULL;

B.

*myPtr = NULL;

C.

if(!myPtr) *myPtr = NULL;
   else *myPtr = NULL;

D.

All of these

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



9:  

Consider the following program fragment.
static char wer[3][4] = {"bag", "let", "bud"};
char(*ptr)[4] = wer;

In which of the following cases will the character 't' be printed?

A.

 putchar ( * ( * (ptr+1) + 2));

B.

putchar ( * (wer [1] + 2) ) ;

C.

putchar (* (ptr+1) + 2);

D.

none of the above

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



10:  

Consider the following program fragment.
static char wer[3][4] = {"bag", "let", "bud"};
char(*ptr)[4] = wer;

The possible output of printf ("%d %d" , wer[1] , wer[1] +1); is

A.

362 363

B.

162 162

C.

162 166

D.

162 165

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:




Syllabus Covered in this section is

  • Elements of C-Tokens
  • Identifiers
  • data types in C
  • Control structures in, C
  •  Sequence, selection and iteration(s).
  • Structured data types in C
  • Arrays, Structures, union, String, and pointers
  • Functions, Recursion
  • Parameter passing, Scope
  •  Binding, Abstract data types

This Section covers Multiple Choice Questions Answers in C Programming . Here questions answers are given with explanation and references. These questions can be used for the preparation of various competitive and academic exams.

Who can benefit - 

  • Any undergraduate or postgraduate student who is seeking C Programming objective type questions answers can use this section.
  • C programming Multiple Choice questions Answers can help you in interview preparation.
  • C Programming Objective type Questions Answers are also used at SSC and HSc level for Exam preparation.
  • C Programming MCQ Questions Answers are also used by engineering students in the preparation of their Exams.
  • Any candidate who has to appear for DOEACC A, B or C level Exam can also learn C Programming Questions Answers.
  • All the teachers who are appearing for Kendriya Vidyalya Sangathan Entrance Exam can also use C Programming Multiple Choice Questions Answers.
  • C Programming MCQs can also be used by the students who are pursuing B.Sc or Msc Computer Science.
  • C Programming Questions Answers can also be used by BCA students for the preparation of their exams.
  • Any student who is pursuing B.Sc. in Information Technology can also use this C Programming mcq Questions Answers.
  •  MCA students can also prepare for their exams using  C Programming Objective Type Questions Answers.
  • You can get free access to C Programming mcq pdf.
  • You can also have online access to C Programming Questions Answers EBook.

Various Search Terms used for this section are

  • C Programming quiz questions with answers

  • C Programming exam questions answers

  • C Programming MCQ questions Answers

  • C Programming MCQ

  • C Programming Questions Answers