15,552 Topics
| |
Hi all, I got a problem with this question: Read the string "hello" include the NULL character in the end of string. How can I do it ? | |
is min heap different from max heap...? can you please show me examples...? | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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. | |
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. … | |
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 … | |
| 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 … |
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 … | |
i need automata program in c language...... | |
[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]; … | |
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 … | |
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 … | |
[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... | |
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, … | |
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 | |
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 … | |
[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; … | |
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 | |
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. | |
[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(); … | |
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... | |
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. | |
1) how to connect c to database..... 2) how to connect C++ to Database...... Reply me its urgent. | |
| 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 … |
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 … |
The End.