C Functions Questions and Answers
C Functions Questions with Answers provide an in-depth look at one of the most fundamental concepts in C programming. Understanding how to define, call, and manage user-defined and library functions is key to mastering structured programming. These C programming MCQs are widely used in technical interviews and coding tests conducted by companies like TCS, Wipro, and Infosys. Each question includes explanations to help you grasp parameter passing, recursion, return types, and scope. Practicing programming questions with answers strengthens your coding logic and prepares you for real-world software challenges. Download C programming MCQ PDFs and practice online to enhance your technical aptitude efficiently.
C Functions
Showing 10 of
151 questions
131. Which of the following data structure used in function recursion.
- Stack
- Queue
- Tree
- None of the above
132. When variable are push into the function frame address of variable are
- Growing up
- Growing down
- Growing left
- Growing right
133. When variables are push into stack, that stack pointer (SP) growing
- Up
- Down
- Left
- Right
134. Find the output int n=0, R; void main ( ) { R=0; printf("%d %d", fun (n), R); } int fun (int n) { if (n>3) return R=5; R=6; return (1); }
- 1 6
- 1 6
- 1 0
- 1 5
135. Find the output static int c; void f(int n) { int i; for (i =1; i<=n;i++) f (n-i); c++; } void main ( ) { extern int c; f (5); printf ("%d",c); }
- 32
- 22
- 35
- 45
136. Find the output void fun (int, int*); void main ( ) { int j, i=5; int *inptr; intptr=&j; j=i; printf("%d %d", i, j); fun (j, intptr); printf(" %d %d", i, j); } void fun ( int k, int *iptr) { k++; (*iptr) ++; return; }
- 5 5 5 6
- 5 5 6 6
- 5 6 5 6
- 5 5 6 5
137. Find the output void main ( ) { int i=4; if (i>5) printf ("Hi"); else f(i); } f (int j) { if (j>=4) f(j-1); else if (j==0)return; printf ("%d",j); return; }
- 23
- 34
- 45
- 67
138. Find the output int *NEXT (register nt i) { char *ipt; ipt=&i; ipt++; *ipt=1; return ipt; } int j=1; printf("%d", *(NEXT (J))); }
- 0
- 1
- 11
- 257
139. Find the output funct ( char* str) { printf ("%s", str); } void main( ) { static int ii=1; int jj=5; ii+=++jj; funct(ii++"Campus Intervies"); }
- Campus Interview
- Interview
- nterview
- s interview
140. Find the output funct (str) { printf("%s", str); } void main ( ) { funct('-'-'-'+"CIMPLE"); }
- CIMPLE
- Garbage
- --CIMPLE
- Compilation error