CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Interview Success Kit - Get Success in Job Interviews Interview Success Kit - 30,000 Interview Que. & Ans.
Covers 30,000+ Interview Questions asked in actual MNC Interviews - all with model answers.
Get Your Dream Job Now - www.vyoms.com
Sponsored Links
Interview Questions
Our Services

INTERVIEW QUESTIONS C FUNCTIONS IN C DETAILS
Question :
Can you use the function fprintf()to display the output on the screen?
Category Functions in C Interview Questions
Rating (3.9) By 70 users
Added on 5/20/2013
Views 1064
Rate it!
Answers:



Use it as:

fprintf( stout, "Hello %s
", name );
this line prints Hello on the console.

to print "Hello" in a file, put the file pointer in the place of stdout
eg:
fprintf( fp, "Hello %s
", name );

however, the file should be opened in write mode since we are writing.



Posted by: Manik Sidana

Contact Manik Sidana Contact Manik Sidana

no u can't do it...it is used to write data into the file...



Posted by: priya ranjan pani

Contact priya ranjan pani Contact priya ranjan pani

Yes. by duplicating the ostream file descriptor



Posted by: Kiran

Contact Kiran Contact Kiran

#include<stdio.h>
int main()
{
char name[10]="prachee";
fprintf( stdout, "Hello %s ", name );

getchar();
return 0;
}



Posted by: prachee

Contact prachee Contact prachee

fprintf(fp,"%d",printf("Hello"));

THis prints Hello on screen



Posted by: Swamy

Contact Swamy Contact Swamy

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.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification Enter the above shown code: *
    Inform me about updated answers to this question

    Related Questions
    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.
    View Answer
    code To draw a three dimensional graph using c graphics
    View Answer
    What is meant by malloc function
    View Answer
    How do we get Square root of any number Without using sqrt() function?

    View Answer
    What are returned by printf(), scanf() functions,if they return anything means what are that?

    View Answer
    Have you heard of "mutable" keyword?

    View Answer
    What is the purpose of main( ) function?

    View Answer
    Is using exit() the same as using return?


    View Answer
    Is it possible to execute code even after the program exits the main() function?


    View Answer
    What is a static function?


    View Answer
    Difference between Funtion to pointer and pointer to function

    View Answer
    How can send unlimited no of arguments to a function, eg printf function can take any no of arguments

    View Answer
    We should not read after a write to a file without an intervening call to fflush(), fseek() or rewind()

    View Answer
    How argc and argv works in the following main function?


    main(int argc,char *argv[])
    { int n,i=0;
    while(argv[1][i]!='
    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

    User Options
    Latest 20 Questions
    What is cross cutting concern and concern in spring AOP ?
    What are the important beans lifecycle methods ?
    Explain the advantages of using DAO module?
    What is SQLProvider ?
    How struts application can be integrated with spring?
    What are the advantages of spring framework?
    What is ?Throws advice? in Spring ?
    What is Metadata Autoproxying ?
    Describe about DAO in Spring framework ?
    What is called an Advice ?
    What is IOC?
    What are the types of Dependency Injection?
    What are the different Modes of Autowiring ?
    Define Application context module?
    Why Spring framework is needed?
    What is called Spring MVC?
    What is Bean Factory?
    What is the default scope of bean in Spring framework?
    How to create arrays in JavaScript?
    How can JavaScript codes be hidden from old browsers that don?t support JavaScript ?


    Copyright ©2003-2016 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes


    Cache = 0 Seconds