Sponsored Content
Full Discussion: Coursework for to while
Homework and Emergencies Homework & Coursework Questions Coursework for to while Post 302511976 by bakunin on Friday 8th of April 2011 04:33:29 AM
Old 04-08-2011
Quote:
Originally Posted by mgyeah
Code:
                // n++;
                //sum += next;

You have commented the only place where "sum" is incremented - small wonder it remains 0 all the time. ;-))

bakunin
This User Gave Thanks to bakunin For This Post:
 

4 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Rules for Homework & Coursework Questions Forum

Homework Help: On Posting Questions: Any and all high school and undergraduate homework assignments or textbook style exercises for which you are seeking assistance are to be posted only in our Homework & Coursework Questions area--not in blogs, visitor messages, PMs, or the main technical... (0 Replies)
Discussion started by: Neo
0 Replies

2. Homework & Coursework Questions

Community Spirit and Ethos on Homework & Coursework

Helping students is in line with the "community spirit" ethos of The UNIX and Linux Forums which aims to give free help and advice in order to support the personal and professional development of others. We encourage students to think carefully about what they do, and do not, understand about... (0 Replies)
Discussion started by: Neo
0 Replies

3. Homework & Coursework Questions

Can anybody help me with coursework

This is the coursework, in Technical University Sofia, Bulgaria prof. Koshmarov, sorry but the link to the course is broken. And this is the condition: 1. If the value of x is 5, and you have been set a new value as such x="expr $x + 10", What would be the value of x? What... (1 Reply)
Discussion started by: astralito
1 Replies

4. Post Here to Contact Site Administrators and Moderators

About Rules for Homework & Coursework Questions Forum

Hi, in my case, I have a question for topics that are slightly dealt with in class, which I am investigating on my own but which are not directly related to the lessons. Do I have to put the name of the school and others? (I can't put the name of the professor because is against the school rules... (2 Replies)
Discussion started by: Naky
2 Replies
mktemp(3C)						   Standard C Library Functions 						mktemp(3C)

NAME
mktemp - make a unique file name from a template SYNOPSIS
#include <stdlib.h> char *mktemp(char *template); DESCRIPTION
The mktemp() function replaces the contents of the string pointed to by template with a unique file name, and returns template. The string in template should look like a file name with six trailing 'X's; mktemp() will replace the 'X's with a character string that can be used to create a unique file name. Only 26 unique file names per thread can be created for each unique template. RETURN VALUES
The mktemp() function returns the pointer template. If a unique name cannot be created, template points to a null string. ERRORS
No errors are defined. EXAMPLES
Example 1: Generate a filename. The following example replaces the contents of the "template" string with a 10-character filename beginning with the characters "file" and returns a pointer to the "template" string that contains the new filename. #include <stdlib.h> ... char *template = "/tmp/fileXXXXXX"; char *ptr; ptr = mktemp(template); USAGE
Between the time a pathname is created and the file opened, it is possible for some other process to create a file with the same name. The mkstemp(3C) function avoids this problem and is preferred over this function. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
mkstemp(3C), tmpfile(3C), tmpnam(3C), attributes(5), standards(5) SunOS 5.10 15 Sep 2004 mktemp(3C)
All times are GMT -4. The time now is 03:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy