|
INTERVIEW QUESTIONS
C
FUNCTIONS IN C
DETAILS
Question: How to use the cprintf,cscanf,sscanf,sprintf,vsscanf,vsprintf,vscanf & vprintf?
Answer: cprintf:This function sends the formatted output to the text window on the screen. cscanf:This function reads reads from the standard input device directly,avoiding buffering both by DOS and by the library. sprintf: This function sends formatted output to the string. sscanf: This function scans formatted text from the string and stores i on the variables pointed to by the arguments. vprintf: This function sends formatted output to stdin,using an argument list. vscanf: This function scans formatted text from stdin and stores it in the variables pointed to by the arguments. vsprintf:This function sends formatted output to the string using argument list. vsscanf: This function scans formatted text from the string and stores it in the variables.
|
|
|
Category |
Functions in C Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8162 users |
Added on |
9/15/2013 |
Views |
68660 |
Rate it! |
|
|
Question:
How to use the cprintf,cscanf,sscanf,sprintf,vsscanf,vsprintf,vscanf & vprintf?
Answer:
cprintf:This function sends the formatted output to the text window on the screen. cscanf:This function reads reads from the standard input device directly,avoiding buffering both by DOS and by the library. sprintf: This function sends formatted output to the string. sscanf: This function scans formatted text from the string and stores i on the variables pointed to by the arguments. vprintf: This function sends formatted output to stdin,using an argument list. vscanf: This function scans formatted text from stdin and stores it in the variables pointed to by the arguments. vsprintf:This function sends formatted output to the string using argument list. vsscanf: This function scans formatted text from the string and stores it in the variables. Source: CoolInterview.com
Answered by: sangitha | Date: 10/14/2008
| Contact sangitha
scanf(const char *format, ...); The scanf() function reads input from the standard input stream stdin.
fscanf(FILE *stream, const char *format, ...); fscanf() reads input from the stream pointer stream.
sscanf(const char *str, const char *format, ...); sscanf() reads its input from the character string pointed to by str.
#include <stdarg.h>
vscanf(const char *format, va_list ap); vsscanf(const char *str, const char *format, va_list ap); vfscanf(FILE *stream, const char *format, va_list ap);
The vfscanf() function reads input from the stream pointer stream using a variable argument list of pointers. The vscanf() function scans a variable argument list from the standard input and the vsscanf() function scans it from a string. Source: CoolInterview.com
Answered by: prakash | Date: 10/20/2008
| Contact prakash
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How to convert decimal to octal and hexadecimal in c program?
|
View Answer
|
|
How to use floodfill() function and what is the use of kbhit?
|
View Answer
|
|
Write a program with out using main() function?
|
View Answer
|
|
Can there be at lest some solution to determine the number of arguments passed to a variable argument list function?
|
View Answer
|
|
What do the functions atoi(),itoa()and gctv()do?
|
View Answer
|
|
How would you use bsearch()function to search a name stored in array of pointers to string?
|
View Answer
|
|
How would you use the functions sin(),pow(),sqrt()?
|
View Answer
|
|
how would you use the functions memcpy(),memset(),memmove()?
|
View Answer
|
|
How would you use the functions randomize()and random()?
|
View Answer
|
|
How would you use the functions randomize()and random()?
|
View Answer
|
|
what is the difference between the functions rand(),random(),srand() and randomize()?
|
View Answer
|
|
Can you use the function fprintf()to display the output on the screen?
|
View Answer
|
|
How to see return value of main function?
|
View Answer
|
|
How to write a program in c to print its own code?
|
View Answer
|
|
What is the function of c?
|
View Answer
|
|
1. what is a difference between printf and cout . and why printf called a function and cout object as both are used to print data?
|
View Answer
|
|
How to print a statement without using printf() in c?
|
View Answer
|
|
Write a Program to convert decimal to binary no.
|
View Answer
|
|
What is the output of void main() { int a = (1,2,3); printf("%d",a); }
with reason.
|
}
- Functions in C Interview Questions & Answers">
View Answer
|
|
code To draw a three dimensional graph using c graphics
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Functions in C Interview Questions & Answers - Exam Mode /
Learning Mode
|