23601. Functions cannot return a floating point number
23602. Every function must return a value
23603. If a function contains two return statements successively, the compiler will generate warnings. Yes/No ?
23604. Maximum number of arguments that a function can take is 12
23605. Will the following functions work? int f1(int a, int b) { return ( f2(20) ); } int f2(int a) { return (aa); }
23606. Usually recursion works slower than loops.
23607. Is it true that too many recursive calls may result into stack overflow?
23608. In a function two return statements should never occur.
23609. The keyword used to transfer control from a function back to the calling function is
23610. What is the notation for following functions? 1. int f(int a, float b) { / Some code / } 2. int f(a, b) int a; float b; { / Some code / }
23611. How many times the program will print "IndiaBIX" ? #include<stdio.h> int main() { printf("IndiaBIX"); main(); return 0; }
23612. Which of the following is most opposite in meaning to the word "veteran" ?
23613. It was Friday afternoon and the shops were full _____ customers.
23614. The officials of the Tourism Department are waiting at.......... railway to greet a new batch of American tourists
23615. Which files will get closed through the fclose() in the following program? #include<stdio.h> int main() { FILE fs, ft, fp; fp = fopen("A.C", "r"); fs = fopen("B.C", "r"); ft = fopen("C.C", "r"); fclose(fp, fs, ft); return 0; }
23616. On executing the below program what will be the contents of 'target.txt' file if the source file contains a line "To err is human"? #include<stdio.h> int main() { int i, fss; char ch, source[20] = "source.txt", target[20]="target.txt", t; FILE fs, ft; fs = fopen(source, "r"); ft = fopen(target, "w"); while(1) { ch=getc(fs); if(ch==EOF) break; else { fseek(fs, 4L, SEEK_CUR); fputc(ch, ft); } } return 0; }
23617. To scan a and b given below, which of the following scanf() statement will you use? #include<stdio.h> float a; double b;
23618. Out of fgets() and gets() which function is safe to use?
23619. Consider the following program and what will be content of t? #include<stdio.h> int main() { FILE fp; int t; fp = fopen("DUMMY.C", "w"); t = fileno(fp); printf("%d\n", t); return 0; }
23620. What will be the content of 'file.c' after executing the following program? #include<stdio.h> int main() { FILE fp1, fp2; fp1=fopen("file.c", "w"); fp2=fopen("file.c", "w"); fputc('A', fp1); fputc('B', fp2); fclose(fp1); fclose(fp2); return 0; }
23621. What will be the output of the program ? #include<stdio.h> int main() { int k=1; printf("%d == 1 is" "%s\n", k, k==1?"TRUE":"FALSE"); return 0; }
23622. 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; }
23623. If the file 'source.txt' contains a line "Be my friend" which of the following will be the output of below program? #include<stdio.h> int main() { FILE fs, ft; char c[10]; fs = fopen("source.txt", "r"); c[0] = getc(fs); fseek(fs, 0, SEEK_END); fseek(fs, -3L, SEEK_CUR); fgets(c, 5, fs); puts(c); return 0; }
23624. What will be the output of the program ? #include<stdio.h> int main() { float a=3.15529; printf("%2.1f\n", a); return 0; }
23625. What will be the output of the program ? #include<stdio.h> int main() { printf("%c\n", ~('C'-1)); return 0; }
23626. What will be the output of the program ? #include<stdio.h> int main() { FILE fp; unsigned char ch; / file 'abc.c' contains "This is IndiaBIX " / fp=fopen("abc.c", "r"); if(fp == NULL) { printf("Unable to open file"); exit(1); } while((ch=getc(fp)) != EOF) printf("%c", ch); fclose(fp); printf("\n", ch); return 0; }
23627. What will be the output of the program ? #include<stdio.h> int main() { char p; p="%d\n"; p++; p++; printf(p-2, 23); return 0; }
23628. What will be the output of the program ? #include<stdio.h> int main() { FILE ptr; char i; ptr = fopen("myfile.c", "r"); while((i=fgetc(ptr))!=NULL) printf("%c", i); return 0; }
23629. What will be the output of the program ? #include<stdio.h> int main() { printf("%%%%\n"); return 0; }
23630. What will be the output of the program ? #include<stdio.h> int main() { int a=250; printf("%1d\n", a); return 0; }
23631. 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; }
23632. What will be the output of the program if value 25 given to scanf()? #include<stdio.h> int main() { int i; printf("%d\n", scanf("%d", &i)); return 0; }
23633. Point out the error in the program? #include<stdio.h> #include<stdlib.h> int main() { unsigned char; FILE fp; fp=fopen("trial", "r"); if(!fp) { printf("Unable to open file"); exit(1); } fclose(fp); return 0; }
23634. Point out the error in the program? #include<stdio.h> int main() { char ch; int i; scanf("%c", &i); scanf("%d", &ch); printf("%c %d", ch, i); return 0; }
23635. Point out the error in the program? #include<stdio.h> int main() { FILE fp; fp=fopen("trial", "r"); fseek(fp, "20", SEEK_SET); fclose(fp); return 0; }
23636. Point out the error in the program? #include<stdio.h> / Assume there is a file called 'file.c' in c:\tc directory. / int main() { FILE fp; fp=fopen("c:\tc\file.c", "r"); if(!fp) printf("Unable to open file."); fclose(fp); return 0; }
23637. Point out the error/warning in the program? #include<stdio.h> int main() { unsigned char ch; FILE fp; fp=fopen("trial", "r"); while((ch = getc(fp))!=EOF) printf("%c", ch); fclose(fp); return 0; }
23638. Which of the following statement is correct about the program? #include<stdio.h> int main() { FILE fp; char ch; int i=1; fp = fopen("myfile.c", "r"); while((ch=getc(fp))!=EOF) { if(ch == '\n') i++; } fclose(fp); return 0; }
23639. 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; }
23640. Point out the correct statements about the program? #include<stdio.h> int main() { FILE fptr; char str[80]; fptr = fopen("f1.dat", "w"); if(fptr == NULL) printf("Cannot open file"); else { while(strlen(gets(str))>0) { fputs(str, fptr); fputs("\n", fptr); } fclose(fptr); } return 0; }
23641. While calling the fprintf() function in the format string conversion specifier %s can be used to write a character string in capital letters.
23642. A text stream is an ordered sequence of characters composed into lines, each line consisting of zero or more characters plus a terminating new-line character.
23643. Offset used in fseek() function call can be a negative number.
23644. We should not read after a write to a file without an intervening call to fflush(), fseek() or rewind()
23645. In a call to printf() function the format specifier %b can be used to print binary equivalent of an integer.
23646. stderr, stdin, stdout are FILE pointers
23647. A file written in text mode can be read back in binary mode.
23648. Will the following program work? #include<stdio.h> int main() { int n=5; printf("n=%d\n", n, n); return 0; }
23649. Can we specify a variable filed width in a scanf() format string?
23650. 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?
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