15,551 Topics

Member Avatar for
Member Avatar for cezarjont
Member Avatar for Narue
0
6K
Member Avatar for Jishnu

Hi all, I was reading Vijaya Mukhi's The 'C' Odyssey UNIX - The Open-Boundless C (1st ed.). This is in reference to program 43 in the first chapter when file buffering is introduced. [CODE]#include <stdio.h> int main() { FILE *fp; char buff[11]; int pid; fp=fopen("baby1","r"); pid=fork(); if(!pid) { printf("initial file …

Member Avatar for Jishnu
1
583
Member Avatar for gudads

Given the equation: ax3 + 7; x raise to power 3; if any which are correct; a) y = a * x * x * x + 7; e) y = a * ( x * x * x ) + 7; i believe both are correct; cuz both will …

Member Avatar for gudads
0
85
Member Avatar for kenji

Hey, I'm trying to figure out how pointers and C String work together I know the basics about pointer arithmetic but I am having trouble implementing it in my program. I am having a problem at the for loop. [code=CPLUSPLUS]/* Trying to print a string from an offst using pointer …

Member Avatar for vinay_verma107
0
252
Member Avatar for challarao

Hi, I am using ubuntu linux system.In that I am unable to use strrev() function for reversing a string.Is there any library function in linux equivalent to strrev(). Thanks in advance.

Member Avatar for sree_ec
1
4K
Member Avatar for Jamesbch

Hello everyone, I'm developing a multi-client server on Linux and I've noticed a strange behavior: I'm using a regular [B]Makefile[/B] to compile and run my server, nothing fancy. But now I've tried to run my server [B]by hand[/B] using the command line and my server won't accept any incoming connections …

Member Avatar for Jamesbch
0
251
Member Avatar for kloony

Can anyone please explain to me the following strange phenomenon? I have a code in C, and when I compile it is Windows Platform compiler (Borland 5.5), they compiling is fine and when I execute the program, everything turns out ok. However, when I use the same code and compile …

Member Avatar for creeps
0
197
Member Avatar for harikrishna439

HI everybody, currently I'm using ubuntu linux.If I write program in c using c language.I'm getting a warning message while compiling.So if there any to avoid this, please inform me.

Member Avatar for Narue
0
98
Member Avatar for qwrobins

Hi. I've seen this same question in another thread, but I'm actually trying to figure out how to make this work and I keep getting hung up. Here is what I'm trying to do: You are developing a database of measured meteorological data for use in weather and climate research. …

Member Avatar for gerard4143
0
129
Member Avatar for bnickerson

Hi, My webserver code is trying to send an image file over a TCP connection. However, the send() function is returning a -1 value with the error: Connection Reset by peer. I am using a web-browser to access the server so my guess is that the server is somehow sending …

Member Avatar for abhimanipal
0
980
Member Avatar for Mouche

I'm working on a tasklist program to brush up on my C before I take a class. I have two structs, task and tasklist. Here is the task struct: [CODE] typedef struct task { char name[100]; bool completed; /* bool is described as an enum in an included header file …

Member Avatar for abhimanipal
0
147
Member Avatar for sakthi@daniweb

this is the coding of 4cups(paper fold game) game that we played in schoolings... [code=c] #include<stdio.h> #include<conio.h> void even(); void odd(); void cal1(); void cal2(); void job(); char z[]="one",y[]="two",x[]="three",w[]="four",v[]="five",u[]="six",t[]="seven",s[]="eight"; void main() { char a[10],b[]="red",c[]="green",d[]="blue",e[]="yellow"; clrscr(); printf("enter your favourite color from given choice:\n"); printf("red\nblue\ngreen\nyellow\n"); scanf("%s",&a); if(strcmp(a,b)==0||strcmp(a,c)==0) { printf("good luck .you have …

Member Avatar for abhimanipal
0
244
Member Avatar for reliableravi
Member Avatar for jack223

[code] #include <stdio.h> #include <iomanip> int main() { int binary1[8] = {0,1,1,1,1,0,1,1}; //8 element array int binary2[8] = {1,0,1,0,1,1,1,1}; //8 element array int binarySum[9]; int overflow [9]; int i; for (i=0; i<9; i++) overflow[i] = 0; for (i=9; i >= 0; i--) { binarySum[i] = binary1[i] + binary2[i] + overflow[i]; …

Member Avatar for harunosakura
0
1K
Member Avatar for nigelmercier

I'm writing a function that stores an integer as separate bytes in an array, see [URL="http://www.daniweb.com/forums/thread25312.html"]here[/URL]. I've got to the part when I detect a button push, and increment the digit over the cursor. If this digit gets to 9, the next push should reset it back to 0. The …

Member Avatar for mitrmkar
0
343
Member Avatar for nigelmercier

I'm working on a PIC project, and my brain has almost exploded! I'm hoping that by writing down my problem, that the answer will come to me, but please feel free to help! Background (mostly irrelevant to an outsider): I'm storing a number in a variable (say r, an unsigned …

Member Avatar for nigelmercier
0
211
Member Avatar for sakthi@daniweb

[code=c] #include<stdio.h> main() { int a=5; printf("%d,%d%,d",++a,++a,++a); } [/code] the output of this is 8,7,6 instead of 6,7,8 y it is so...

Member Avatar for WaltP
0
70
Member Avatar for Castiel1631

I need to write a program in C that decrypts a 12 character message in the file encrypted.txt however whenever I try to open this file it comes up as null. I'm confused, I've tried different methods, the only thing I can think of is I don't have the file, …

Member Avatar for creeps
0
91
Member Avatar for challarao

Hello! I have a small doubt about formal specifiers. I have seen in many programs of printf statements,writing "%2d".What is the use of writing an integer before d or any formal specifiers. Thanks in advance

Member Avatar for creeps
0
97
Member Avatar for creeps

Elaborating on the title, I'm trying to complete an exercice in K.N. King's [i]C Programming: A Modern Approach[/i] which requires me to accomplish the task in the quote below. My idea works, but the program does not return control to the OS. I've nailed the problem down to the do/while …

Member Avatar for Narue
0
145
Member Avatar for Mehh

[CODE]#include <windows.h> #include "resource.h" const char g_szClassName[] = "myWindowClass"; return; DialogBox(hInstance, MAKEINTRESOURCE(IDD_SIMPLECONTROL), NULL, SimpleProc);} int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) BOOL CALLBACK SimpleProc(HWND hWndDlg, UINT Message, WPARAM wParam, LPARAM lParam){switch(Message){ case WM_INITDIALOG: return TRUE; case WM_COMMAND:switch ( LOWORD (wParam) ) { case ID_HELLO:MessageBox(NULL,"Hey", "Hallo!", MB_OK); break; …

Member Avatar for Ancient Dragon
-1
171
Member Avatar for SaiBalaji

Please give me solution in easy way to understand easily. Note : This program is useful to Basic learners Problem: Write a C program that reads an integer n and uses an array to efficiently find out the first n prime numbers

Member Avatar for Nick Evan
-1
101
Member Avatar for SaiBalaji

Please give me answer for following question in easy way for understanding of basic learners. Write a C program that reads an integer n and stores the first n Fibonacci numbers in an array.

Member Avatar for Narue
0
258
Member Avatar for itsmeisuru

[code] #include<stdio.h> #include<conio.h> #include<stdlib.h> int main(){ int i = 2; char a[1]; itoa(i, a, 10); char *command = ("md %s", a); system(command); char *cop = ("copy %s.jpg \%s\%s.jpg" , a, a, a); // want to copy the jpg file in to system(cop); //new made folder the path as (2/2.jpg) getch(); …

Member Avatar for itsmeisuru
0
104
Member Avatar for priyanka.js28

which one of the following will execute faster? int p=2; p++; OR p=p+1;OR p+=1; and y?? is it p++ bcoz it is a single instruction??...nd the rest r multiple...

Member Avatar for SaiBalaji
0
405
Member Avatar for virtualvictory

Can anyone please help me in debugging this program.This is the implementation of linked list.I have not inserted delete function.I couldn't display the data in the list properly.

Member Avatar for Ancient Dragon
0
74
Member Avatar for chandrut

1) how to connect c to database..... 2) how to connect C++ to Database...... Reply me its urgent.

Member Avatar for Ancient Dragon
0
113
Member Avatar for Kevin_160

I'm doing my master thesis on radar signal generation and to create a scenario, I need to have a timing in execution of my C-script of microseconds resolution. By using the time.h I can only get to a resolution of 1 millisecond. I know it is feasible in linux, but …

Member Avatar for Kevin_160
0
243
Member Avatar for Micko

Hi people, when starting many of us were warn not to use gets() function. We know it's unsafe and it might easily crah program. On many boards there is FAQ in which there are advices not to use gets(). I wonder why such function exist in standard library and why …

Member Avatar for Narue
1
137
Member Avatar for Kevin_160

Hi Everybody, FYI (In order to get a feeling with the time it takes to send command strings to signal generators via a GPIB bus, I want to send a voltage level high pulse to an oscilloscope. Ones the RF signal arrives via a detector diode, The pulse and the …

Member Avatar for Kevin_160
0
351

The End.