Q. What is the output of C Program with functions and pointers.?

Code:
int main()
{
    int b=25;
    //b memory location=1234;
    int *p = b;
    printf("%d %d", b, p);

    return 0;
}
  • (A) 25 1234
  • (B) 25 0
  • (C) 25 25
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 25 25

Q. What is the output of C Program with functions and pointers.?

Code:
int main()
{
    int b=25;
    //b memory location=1234;
    int *p;
    p=&b;
    printf("%d %d %d", &b, p);
    return 0;
}
  • (A) 25 25
  • (B) 1234 1234
  • (C) 25 1234
  • (D) 1234 25
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1234 1234

Q. What do you call STAR * and Ampersand & in a c program context.?

Code:
int a=10, *p;
p = &a;
printf("%d %d", a, *p);
  • (A) * = ADDRESS OF operator, & = VALUE AT operator
  • (B) * = ADDRESS OF operator, & = ADDRESS OF operator
  • (C) * = VALUE AT operator, & = ADDRESS OF operator
  • (D) * = VALUE AT operator, & = VALUE AT operator
πŸ’¬ Discuss
βœ… Correct Answer: (C) * = VALUE AT operator, & = ADDRESS OF operator

Q. Arguments passed to a function in C language are called ___ arguments.

  • (A) Formal arguments
  • (B) Actual Arguments
  • (C) Definite Arguments
  • (D) Ideal Arguments
πŸ’¬ Discuss
βœ… Correct Answer: (B) Actual Arguments

Q. Arguments received by a function in C language are called ___ arguments.

  • (A) Definite arguments
  • (B) Formal arguments
  • (C) Actual arguments
  • (D) Ideal arguments
πŸ’¬ Discuss
βœ… Correct Answer: (B) Formal arguments

Q. Choose a corrects statement about C language function arguments.

  • (A) Number of arguments should be same when sending and receiving
  • (B) Type of each argument should match exactly
  • (C) Order of each argument should be same
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. What is the output of C program with functions?

Code:
int main()
{
    printf("funny=%d" , funny());
    return 0;
}
funny()
{
   
}
  • (A) funny=
  • (B) funny=1
  • (C) funny=0
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) funny=0

Q. What is the output of C Program with functions?

Code:
void funny2();
int main()
{
    printf("funny2=%d" , funny2());
    return 0;
}
void funny2()
{

}
  • (A) funny2=
  • (B) funny2=0
  • (C) funny2=1
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (D) Compiler error

Q. Choose a correct statement with C Functions.

  • (A) A function can call any other function any number of times
  • (B) You can write any function in any order in a multi function C File.
  • (C) You can refer to or call any function using a Pointer also.
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Choose a non Library C function below.

  • (A) printf()
  • (B) scanf()
  • (C) fprintf()
  • (D) printf2()
πŸ’¬ Discuss
βœ… Correct Answer: (D) printf2()