Function prototipe:
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *timep, struct tm *result);
Man page:
The localtime() function ...
Type: Posts; User: ralu.
Function prototipe:
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *timep, struct tm *result);
Man page:
The localtime() function ...
I've found this programming puzzle questions on a site && i thought to share them with you all:
Q1 Write a "Hello World" program in 'C' without using a semicolon.
Q2 Write a C++ program without...
If u ran the program as it is you get:
01010101
If the output is redirected to a file, the same result is obtained.
If you put a \n after "%d" you get:
matsp, QuantumPete i was not expecting the pb to be interesting for you, cause i know it's not... But on this forum are many newbies for whom this is interesting: the result is not what they expect...
Here it is another interesting problem:
#include <stdio.h>
int main(int argc, char **argv)
{
int i;
double num = 0.0;
For those who like to keep your mind sharp or for those who want to test their skills in programming here is an interesting C programming bug:
#include <stdio.h>
#include <unistd.h>
int...
lol... take a book and learn... have you at least read the site page i gave you? i guss not...
If by "bitvectors" you mean bit fields than here it is what you can find on wikipedia:
http://en.wikipedia.org/wiki/Bitfield
http://www.cs.cf.ac.uk/Dave/C/node13.html
read this:
http://www.geocities.com/learnprogramming123/Clesson11.htm
You can also search on wikipedia/google for more information or bay a c programming book.
The prototipe for strncpy is this:
char *strncpy(char *dest, const char *src, size_t n);
where n are the bytes of the src to be copied not the sizeof(dest).
I've done this with your function and is working just fine:
#include <stdio.h>
void printtofile(char **wrdhold, char *out)
{
I was just playing with python c api for the first time and I've written this (test) module for python:
#include <Python.h>
#define VAL1 1
#define VAL2 2
struct name_val {
char* name;
First of all the abs function has this prototype:
int abs(int j);
It aspects an int not a float.
Use one of this instead:
#include <math.h>
double fabs(double x);
...
You can't find it because sleep is a unix system call/command. You need its equivalent function in Windows. I'm not sure witch one it is, but i guess it should be smthg like Sleep(). Search for it on...
1. you should use
int main(int argc, char **argv) or at least int main(). Just main(), it will generate an error, smthg like: main function should return a value - when the program is build with...
Your main function should return a value. Pay more attention when typing:
/* Asks user to input a grade form 0-100 8/
It should be an * instead of the 8.
convertGrade function does not...
If you know how to use while loop than is simple to use a for loop instead of the while loop. The similarities between this 2 loop are this:
*while loop:
int contor = 0;
while(cnd) {
/* do...
Yes. Your bug is that u put ";" after while... :
while (c != EOF);
{
putchar(c);
c = getchar();
}
It's true that c is case sensitive but for the name of the header file it doesn't matter if u write it with lower/upper letters.
If u want the user to imput a specific char you can do smthg like:
int letter;
printf ("Please input letter [A or B]:\n");
do {
letter = getch();
letter = toupper(letter);
}
while ((letter...
The error is because this:
Program Name:program1
Author:geekrockergal
This sould be a comment so make it a comment:
/*
Program Name:program1
Author:geekrockergal
*/
No. It has nothing to do with the length... 27 is the zecimal value of the ESC ASCII char. So that means do that until "ESC" is pressed.
Preprocessor Directives
http://en.wikipedia.org/wiki/Preprocessor
http://en.wikipedia.org/wiki/Directive_(programming)
User-Defined and Enumerated Data Types...
So... if you want to create a program that output a letter that the user inputted you can do smthg like this:
char letter;
printf ("Please input letter:\n");
do {
letter = getch();
printf...
What u wrote is wrong... he has a 9x9 matrix already... to put it your way 0 to 8 is 9. and a[8] in the 9th element.