Output Question.

This is a discussion on Output Question. within the C Programming forums, part of the General Programming Boards category; Code: system("cd"); printf(">"); I want the output ">" to be placed after the output of "cd". Currently, ">" appears on ...

  1. #1
    Registered User kinghajj's Avatar
    Join Date
    Jun 2003
    Posts
    218

    Output Question.

    Code:
    system("cd");
    printf(">");
    I want the output ">" to be placed after the output of "cd". Currently, ">" appears on a new line after "cd". Is there any way to change this?

    [p.s. I checked the FAQ and google this time, and couldn't find anything related on this topic.]

  2. #2
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    most commands throw in a new line at the end.

    unless you want to alter the output of the command i think your stuck with it. you can use the output of the command like a file.

  3. #3
    Registered User kinghajj's Avatar
    Join Date
    Jun 2003
    Posts
    218
    getcwd()? Is than in stdlib.h?

  4. #4
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    #include <unistd.h>

    getcwd()

  5. #5
    Registered User kinghajj's Avatar
    Join Date
    Jun 2003
    Posts
    218

    Thanks

    I got it to work. Thank to everyone

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question: Output of data.txt from the following program
    By outlaw525 in forum C Programming
    Replies: 9
    Last Post: 06-23-2008, 04:33 PM
  2. strange virtual function output
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 02-08-2008, 08:08 AM
  3. Basic C input output program help
    By trevordunstan in forum C Programming
    Replies: 2
    Last Post: 01-27-2008, 06:41 PM
  4. a question about file output
    By wang8442 in forum C Programming
    Replies: 3
    Last Post: 12-26-2004, 03:18 AM
  5. a newbie question about file output
    By maybe in forum C Programming
    Replies: 8
    Last Post: 10-12-2004, 09:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21