printf

  1. A

    truncation

    I am given the task to find the value of PI up to decimal poins 'x' awhere 'x' is input through keyboard. If I use c++ and use setprecision() defined in iomanip.h, I am getting rounded off results. I need accurate truncated value. If I use c, I can not use a variable in precision field in...
  2. Ashokkumar01cbe

    whts Going inside the printf..

    when i compile the below code 1) program main( ) { printf ( 5 + "Good Morning " ) ; } i got the result as Morning.. and in another code 2) program main( ) { printf ( "%c", "abcdefgh"[4] ) ; } in the 2nd program i got the result a "e"...
  3. Ashokkumar01cbe

    whts doing inside the printf..

    when i compile the below code 1) program main( ) { printf ( 5 + "Good Morning " ) ; } i got the result as Morning.. and in another code 2) program main( ) { printf ( "%c", "abcdefgh"[4] ) ; } in the 2nd program i got the result a "e"...
  4. dharmil007

    Basic Programme giving Error

    HeLLo i m new to C & trying to learn it. i Wrote a programme but when it runs it givese the values as GARBAGE values. i Dont know why ?? So can pls anybody gimme a solution /*The distance between 2 cities {in km.} is input through the Keyboard.WAP to convert & print thsi distance in meters...
  5. slugger

    ?using single printf statement to print 2 answers?

    I am trying to print out two calculated values using a single printf statement, but am unable to do so. The part of the program where I am trying to do this looks like this printf ("The answers are %f and %f\n", floatpt1, floatpt2); where the 2 float point values have alredy been...
  6. M

    Printing a smiling face in C

    I have been trying to solve this problem in C "Write a program to fill the entire screen with a smiling face. The smiling face has an ASCII value one." I did misunderstand the program and have made errors, but the program is here *rafb.net/p/oFCBvw86.html Now, the main problem is: I...
  7. S

    c program

    hi i write the following program. -------------------------------------------------------------- # define swap(a,b) temp=a; a=b; b=temp; main( ) { int i, j, temp; i=5; j=10; temp=0; if( i > j) swap( i, j ); printf( "%d %d %d", i, j, temp); }...
  8. R

    scanf() function

    like every function what value is returned by scanf() and printf() in C.
  9. bizzare_blue

    Anybody plz help me with C

    Can anyone tell me the syntax 4 using printf n scanf commands in C? Urgent........
Top Bottom