Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336
In a file contains the line "I am a boy\r\n" then on reading this line into the array str using fgets(). What will str contain? ?->(Show Answer!)
Question Set

1. In a file contains the line "I am a boy\r\n" then on reading this line into the array str using fgets(). What will str contain?





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.02 pm
    Declaration: char *fgets(char *s, int n, FILE *stream); fgets reads characters from stream into the string s. It stops when it reads either n - 1 characters or a newline character, whichever comes first. Therefore, the string str contain "I am a boy\n\0"
Show Similar Question And Answers
QA->The extension jpeg in the name of a file indicates that it is a/an file.....
QA->A man is facing East, then the turns left and goes 10 m, then turns right and goes 5 m, then goes 5 m to the South and from there 5 m to West. In which direction is he, from his original place ?....
QA->Method of cultivating plants without using soil but by using nutrient solution?....
QA->If a document contains 50 pages and you want to move the 25th page, you do so by using the option.....
QA->You can import a text file into QuarkXPress from:....
MCQ->In a file contains the line "I am a boy\r\n" then on reading this line into the array str using fgets(). What will str contain?....
MCQ->What will be the output of the program ? #include<stdio.h> int main() { FILE fp; char ch, str[7]; fp=fopen("try.c", "r"); / file 'try.c' contains "This is Nagpur" / fseek(fp, 9L, SEEK_CUR); fgets(str, 5, fp); puts(str); return 0; }....
MCQ->What will be the output of the program ? #include<stdio.h> char str = "char str = %c%s%c; main(){ printf(str, 34, str, 34);}"; int main() { printf(str, 34, str, 34); return 0; }....
MCQ->Which of the following statement is correct about the program? #include<stdio.h> int main() { FILE fp; char str[11], ch; int i=0; fp = fopen("INPUT.TXT", "r"); while((ch=getc(fp))!=EOF) { if(ch == '\n' || ch == ' ') { str[i]='\0'; strrev(str); printf("%s", str); i=0; } else str[i++]=ch; } fclose(fp); return 0; }....
MCQ->Which of the following statements are correct about the C#.NET code snippet given below? int[] a = {11, 3, 5, 9, 4}; The array elements are created on the stack. Refernce a is created on the stack. The array elements are created on the heap. On declaring the array a new array class is created which is derived from System.Array Class. Whether the array elements are stored in the stack or heap depends upon the size of the array.....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution