Question:What will be output if you will compile and execute the following c code?
#include<stdio.h>
int main(){
  char *str;
  scanf("%[^\n]",str);
  printf("%s",str);
  return 0;
}
 

A It will accept a word as a string from user. 

B It will accept a sentence as a string from user. 

C It will accept a paragraph as a string from user. 

D Compiler error 

E None of above 

+ Answer
+ Report
Total Preview: 1429

Copyright © 2024. Powered by Intellect Software Ltd