All India Exams
  • Sign In / Register Sign In
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

Pointers C Questions And Answers

Here you can find Pointers C Questions and Answers.

Why Pointers C Questions and Answers Required?

In this Pointers C Questions and Answers section you can learn and practice Pointers C Questions and Answers to improve your skills in order to face technical inerview conducted by Banks. By Practicing these interview questions, you can easily crack any Bank Exams interview.

Where can I get Pointers C Questions and Answers?

AllIndiaExams provides you lots Pointers C Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Pointers C Questions and Answers as PDF files and eBooks.

How to solve these Pointers C Questions and Answers?

You no need to worry, we have given lots of Pointers C Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Bank Exams interview.

Pointers C Questions and Answers

1. What is the output of this C code? int main() { char *p = NULL; char *q = 0; if (p) printf(" p "); else printf("nullp"); if (q) printf("q\n"); else printf(" nullq\n"); }

Pointers C Questions and Answers

2. What is the output of this C code? int main() { int i = 10; void *p = &i; printf("%d\n", (int)*p); return 0; }

Pointers C Questions and Answers

3. What is the output of this C code? int main() { int i = 10; void *p = &i; printf("%f\n", *(float*)p); return 0; }

Pointers C Questions and Answers

4. What is the output of this C code? int *f(); int main() { int *p = f(); printf("%d\n", *p); } int *f() { int *j = (int*)malloc(sizeof(int)); *j = 10; return j; }

Pointers C Questions and Answers

5. What is the output of this C code? int *f(); int main() { int *p = f(); printf("%d\n", *p); } int *f() { int j = 10; return &j; }

Pointers C Questions and Answers

6. What is the output of this C code? int main() { int *ptr, a = 10; ptr = &a; *ptr += 1; printf("%d,%d/n", *ptr, a); }

Pointers C Questions and Answers

7. Comment on the following? const int *ptr;

Pointers C Questions and Answers

8. Which is an indirection operator among the following?

Pointers C Questions and Answers

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

Pointers C Questions and Answers

10. What is the output of this C code? int x = 0; void main() { int *ptr = &x; printf("%p\n", ptr); x++; printf("%p\n ", ptr); }

Home EngineeringComputer Science & EngineeringC Multiple Choice Questions & AnswersPointers

Pointers - C Multiple Choice Questions & Answers

This is the c programming questions and answers section on "Pointers" with explanation for various interview, competitive examination and entrance test. Solved examples with detailed answer description, explanation are given and it would be easy to understand. Well, the candidates can refer to this article to know the frequently asked Pointers C Questions. Contenders who are preparing for the interviews can practice the Pointers C Online Test from this page. All the students can find the objective type questions related to the Pointers in the below Pointers C Quiz. Thus, the postulates need to prepare the Pointers C Questions and Answers to know the concept of the Pointers. Individuals can understand all the particulars of the Pointers in C by taking part in the Pointers C Mock Test. In the below online test, the contenders can see the multiple choice questions by covering all the topics in Pointers.



Pointers C Questions - Pointers C Quiz Details

Online Test Name Pointers
Exam Type Multiple Choice Questions
Category Computer Science Engineering Quiz
Number of Questions 34


Pointers in C language is a variable that stores the address of another variable. A Pointer in C is used to allocate memory dynamically that is at runtime. The pointer variable might be belonging to any of the data types such as int, char, double, float, short, etc. Students can learn C programming in simple and easy steps starting from the basic to advanced concepts with examples from our web portal. In addition to this, the contenders can learn more about the Pointers in C by practicing the Pointers C Quiz. Applicants need to check the information or data and take part in the Pointers C Quiz to know all the questions and answers.



Pointers C Multiple Choice Questions

Pointers in C language is the basic concept that needs to know by all the applicants. So, the contenders can start learning about the Pointers with the help of the below-given Pointers C Online Test. In the entrance tests, the questions related to the Pointers will be asked. To score high in the exams, the applicants need to learn the Pointers C Questions and Answers. By this, the candidates can also know the logic behind the Pointers concept. So, move to the below sections and practice the Pointers C Mock Test and learn the various questions along with the answers.

Pointers MCQ Quiz Answers with Solutions

We have also arranged the answers along with the explanations to the Pointers C Multiple Choice Questions on this page. All the applicants can check and practice the questions without any delay. With the help of this post, the candidates can practice the Pointers C Questions form the online test. Follow our web portal that is Allindiaexams.in to cover and exercise all the online tests related to the C Programming Langauge.


1. What is the output of this C code?

int main()
{
char *p = NULL;
char *q = 0;
if (p)
printf(" p ");
else
printf("nullp");
if (q)
printf("q\n");
else
printf(" nullq\n");
}
  • A. nullp  nullq
  • B. Depends on the compiler
  • C. x nullq where x can be p or nullp depending on the value of NULL
  • D. p   q
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

None.

Workspace

Report Error


2. What is the output of this C code?

int main()
{
int i = 10;
void *p = &i;
printf("%d\n", (int)*p);
return 0;
}
  • A. Compile time error
  • B. Segmentation fault/runtime crash
  • C. 10
  • D. Undefined behaviour
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

None.

Workspace

Report Error


3. What is the output of this C code?

int main()
{
int i = 10;
void *p = &i;
printf("%f\n", *(float*)p);
return 0;
}
  • A. Compile time error
  • B. Undefined behaviour
  • C. 10
  • D. 0.000000
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option D

Explanation:

None.

Workspace

Report Error


4. What is the output of this C code?

int *f();
int main()
{
int *p = f();
printf("%d\n", *p);
}
int *f()
{
int *j = (int*)malloc(sizeof(int));
*j = 10;
return j;
}
  • A. 10
  • B. Compile time error
  • C. Segmentation fault/runtime crash since pointer to local variable is returned
  • D. Undefined behaviour
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

None.

Workspace

Report Error


5. What is the output of this C code?

int *f();
int main()
{
int *p = f();
printf("%d\n", *p);
}
int *f()
{
int j = 10;
return &j;
}
  • A. 10
  • B. Compile time error
  • C. Segmentation fault/runtime crash
  • D. Undefined behaviour
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

None.

Workspace

Report Error


  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • »

Related Topics:

  • File Access
  • C Data Types
  • Storage Management
  • Typedef
  • Variable Names
  • Declarations
  • Preprocessor
  • Data Types
  • Conditional Expressions
  • C Operators

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • LIC Mock Test Series

  • MAT Mock Test

  • SEBI Mock Test

  • ESIC Mock Test

  • IT Courses Quiz

Newsletter

Contact Us

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning Questions
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation Questions
  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions
  • AMCAT Mock Online Test
  • LIC Mock Test
  • IBPS Mock Test

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics
  • iOS Interview Questions
  • Web Technologies
  • Database Interview Questions
  • MS Office Interview Questions
  • Software Tools
  • Data Interpretation
  • PHP Interview Questions
  • CAT Mock Test
  • SSC Mock Test
© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy