Sponsored Content
Full Discussion: ambiguity in program output
Top Forums Programming ambiguity in program output Post 302160155 by bishweshwar on Monday 21st of January 2008 03:42:22 AM
Old 01-21-2008
Sorry for bothering anyone if read it.
Got the answer.

read() function reads an entire line from input, i was thinking it of as a character.

Thanks
bishweshwar
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Capturing output from C++ program

Hi I have a C++ program that generates a lot of log information on the console, I need this output (printed using printf function) to go to a file since I will use crontab to schedule the job. I know I can do this: myprog > myfile but I don't know how to enter this in crontab. I use... (3 Replies)
Discussion started by: GMMike
3 Replies

2. UNIX for Dummies Questions & Answers

how can I use the stream output in other program

Hello I wander if im doing : ls -l and its giving me lets say 3 results : -rw-r--r-- 1 blah other 1789 May 19 2003 foo.c -rw-r--r-- 1 blah other 1014 May 19 2003 foo.h -rw-r--r-- 1 blah other 270 May 19 2003 foo1.c now I would like to use the first... (1 Reply)
Discussion started by: umen
1 Replies

3. Programming

C program Output

The output I got for this pgm is "4 4 4 4". Can any one help me to understand how I got this output. Also please suggest me some links to learn about argumnets evaluation in C. # include <stdio.h> void func(int a, int b, int c, int d) { printf("%d %d %d %d", a, b, c, d); } int... (3 Replies)
Discussion started by: arunviswanath
3 Replies

4. AIX

Fs space ambiguity

Hi All, I found a strange thing in one of our DB server. one of the file system /orcale/ABC/rman size df output showing 100% full eventhough its occupying 2.18MB $ df -mP /oraclev/ABC/rman Filesystem MB blocks Used Available Capacity Mounted on /dev/lv20906 1024.00 1024.00 0.00 100%... (2 Replies)
Discussion started by: ram1729
2 Replies

5. UNIX for Dummies Questions & Answers

Program output overflows

I Wrote code that forks into two processes, a parent process, and a child process. The parent process will take the arguments to main() and send them one character at a time to the child process through a pipe (one call to write for each character). The child process will count the characters... (1 Reply)
Discussion started by: hansel13
1 Replies

6. UNIX for Advanced & Expert Users

how do collect shell output in a C program

i use the system command to execute a shell command... ca i collect the out put in the form of a string or something using the same C program? (5 Replies)
Discussion started by: damn_bkb
5 Replies

7. Shell Programming and Scripting

Ambiguity in unicode, Perl CGI

Hello, I was written a cgi with a textarea to save some words from web. I grab and write words like this: $cgiparams{'CONTENTS'} =~ s/\r//g; #$cgiparams{'CONTENTS'} =~ s/á/&aacute;/g; open(TM, ">$editedfilename"); #binmode(TM,... (1 Reply)
Discussion started by: Zaxon
1 Replies

8. Programming

Please help me with my output for my program

Hello All, iam a new memeber today i joined this forum. hope i will get help. the below program takes input strings and give reverse of input string. && mv /home/test1/programs/display /home/test1/programs/old echo " Please enter the test " read a echo "$a" > file wc -c file > file1 perl... (1 Reply)
Discussion started by: ameyrk
1 Replies

9. Programming

Ambiguity in operator []

Hi All, When i try to compile the following code for 64-bit it works, whereas for 32-bit version, Compiler barfs: #include <iostream> #include <string> class String { public: String() { } String(const char* src) : myStr(src) { } String(const std::string& src) :... (0 Replies)
Discussion started by: 14341
0 Replies

10. Shell Programming and Scripting

getting no output with my perl program

hi, i have posted the same kind of the question in some other forum of the same site. but realized that it is supposed to be here so i am reposting it .this is the perl script written to check for particular pattern. my file 1 would look like this hwk:678:9878:asd:09: abc cfgb 12 nmjk ......... (3 Replies)
Discussion started by: anurupa777
3 Replies
Tk_Main(3)						       Tk Library Procedures							Tk_Main(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_Main - main program for Tk-based applications SYNOPSIS
#include <tk.h> Tk_Main(argc, argv, appInitProc) ARGUMENTS
int argc (in) Number of elements in argv. char *argv[] (in) Array of strings containing command-line arguments. Tcl_AppInitProc *appInitProc (in) Address of an application-specific initialization procedure. The value for this argument is usually Tcl_AppInit. _________________________________________________________________ DESCRIPTION
Tk_Main acts as the main program for most Tk-based applications. Starting with Tk 4.0 it is not called main anymore because it is part of the Tk library and having a function main in a library (particularly a shared library) causes problems on many systems. Having main in the Tk library would also make it hard to use Tk in C++ programs, since C++ programs must have special C++ main functions. Normally each application contains a small main function that does nothing but invoke Tk_Main. Tk_Main then does all the work of creating and running a wish-like application. When it is has finished its own initialization, but before it processes commands, Tk_Main calls the procedure given by the appInitProc argument. This procedure provides a ``hook'' for the application to perform its own initialization, such as defining application-specific commands. The procedure must have an interface that matches the type Tcl_AppInitProc: typedef int Tcl_AppInitProc(Tcl_Interp *interp); AppInitProc is almost always a pointer to Tcl_AppInit; for more details on this procedure, see the documentation for Tcl_AppInit. KEYWORDS
application-specific initialization, command-line arguments, main program Tk 4.0 Tk_Main(3)
All times are GMT -4. The time now is 09:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy