adplus-dvertising

Welcome to the Pointers and Arrays in C MCQs Page

Dive deep into the fascinating world of Pointers and Arrays in C with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Pointers and Arrays in C, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Pointers and Arrays in C, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Pointers and Arrays in C. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Pointers and Arrays in C. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Pointers and Arrays in C MCQs | Page 42 of 53

Q411.
Consider the following program fragment. The possible output of printf ("%d %d" , wer[1] , wer[1] +1); is
static char wer[3][4] = {"bag", "let", "bud"};
 char(*ptr)[4] = wer;
Discuss
Answer: (a).362 363
Q412.
Consider the following program fragment.
static char wer[3][4] = {"bag", "let", "bud"};
 char(*ptr)[4] = wer;
 The putchar (* (wer [1] + 1)) ;
Discuss
Answer: (a).prints e
Q413.
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, wer +1); is
Discuss
Answer: (b).262 266
Discuss
Answer: (c).the pointers point to elements of the same array
Discuss
Answer: (c).it should be both declared and initialized
Q416.
Consider the two declarations

void *voidPtr;
char *charPtr;

Which of the following assignments are syntactically correct?
Discuss
Answer: (a).voidPtr = charPtr
Q417.
Which of the following operators can be applied to pointer variable(s)?
Discuss
Answer: (c).Casting
Q418.
Consider the following program. If abcdefg is the input, the output will be
main() 
 {
 char x[10], *ptr = x;
 scanf("%s", x);
 change(&x[4]);
 } 
 change ( char a[ ] )
 {
 puts(a);
 }
Discuss
Answer: (c).efg
Q419.
Pick the correct answers.
If x is an one dimensional array, then
Discuss
Answer: (d).both (b) & (c0
Q420.
Let x be an array. Which of the following cannot be present in the left hand side of an assignment statement?
Discuss
Answer: (d).All of these

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!