The prototypes of all standard library string functions are declared in the file string.h.
It is necessary that for the string functions to work safely the strings must be terminated with '\0'.
Is standard library a part of C language?
FILE is a structure suitably typedef'd in "stdio.h".
Will the program outputs "IndiaBIX.com"?
#include<stdio.h> #include<string.h> int main() { char str1[] = "IndiaBIX.com"; char str2[20]; strncpy(strstr8); printf("%s", str2); return}
The itoa function can convert an integer in decimal, octal or hexadecimal form to a string.
ftell() returns the current position of the pointer in a file stream.
Data written into a file using fwrite() can be read back using fscanf()
If the two strings are found to be unequal then strcmp returns difference between the first non-matching pair of characters.
scanf() or atoi() function can be used to convert a string like "in to integer.
Point out the error in the following program.
#include<stdio.h> int main() { fprintf("IndiaBIX"); printf("%.ef", 2.0); return}
What will the function rewind() do?
What will be the output of the program?
#include<stdio.h> int main() { int i; i = printf("How r u\n"); i = printf("%d\n", i); printf("%d\n", i); return }
#include<stdio.h> #include<string.h> int main() { char str1[] = "Learn through IndiaBIX\0.com", str2[120]; char *p; p = (char*) memccpy(strstr'i', strlen(str1)); *p = '\0'; printf("%s", str2); return }
Input/output function prototypes and macros are defined in which header file?
#include<stdio.h> #include<math.h> int main() { float i = 2. printf("%f, %d", floor(i), ceil(i)); return }
#include<stdio.h> int main() { int i; i = scanf("%d %d", &i, &i); printf("%d\n", i); return}
#include<stdio.h> int main() { char str[] = "IndiaBIX"; printf("%.#s %2s", str, str); return}
Which standard library function will you use to find the last occurance of a character in a string in C?
What is stderr ?
Please disable the adBlock and continue. Thank you.