MCQ Single Best Answer Not Set

QWhat will be the output of the following program?
#include"stdio.h" 
char *fun(){
  char *temp = "atnyla";
  return temp; 
}
void main()
{
puts(fun());
}
 

ID: #1275 Pointer in C Language 892 views
Question Info
#1275Q ID
Not SetDifficulty
Pointer in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A atnyla
  • B Null Pointer Exception
  • C Compiler error
  • D Unexpected results due to dangling pointers
Correct Answer: Option A

Explanation

atnyla

Share This Question

Challenge a friend or share with your study group.