19,876 Topics

Member Avatar for
Member Avatar for sankhamita

Help to write c code to implement the history features of shell(ANSI C)

Member Avatar for Adak
0
84
Member Avatar for Matt_L

First I would like to say my knowledge of C++ is limited; most of my experience is in Java. Also this is my first post to daniweb, so please excuse me if I didn't follow proper etiquette (but please let me know). That being said, I have a need to …

Member Avatar for klemmerj
0
122
Member Avatar for binary_boy

i am making a command line interpreter for an os course. the preoblem statement says that i have to log the output of every command i type in this interpreter along with the usual display in the stdout. how do i do this? i have used dup2 to redirect the …

Member Avatar for binary_boy
0
93
Member Avatar for saminder singh
Member Avatar for SaiBalaji
Member Avatar for Ancient Dragon
0
105
Member Avatar for Saustin_Ben

Hi; I'm coding in C and I'm using the CreateFile function inside of Windows API which is: [CODE] HANDLE WINAPI CreateFile( __in LPCTSTR lpFileName, __in DWORD dwDesiredAccess, __in DWORD dwShareMode, __in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes, __in DWORD dwCreationDisposition, __in DWORD dwFlagsAndAttributes, __in_opt HANDLE hTemplateFile ); [/CODE] In the first argument, lpFieName will …

Member Avatar for hanvyj
0
153
Member Avatar for stranger_on_way

[CODE=c] void function(int a, int b, int c) { char buffer1[5]; char buffer2[10]; int *ret; ret = buffer1 + 12; (*ret) += 8; } void main() { int x; x = 0; function(1,2,3); x = 1; printf("%d\n",x); }[/CODE] I found this code on smashing the stack tutorial and the code …

Member Avatar for IsharaComix
0
77
Member Avatar for firoz3321

I have seen similar posts but could not find the exact answer that i can understand. I have to store and print the value which will 2 power 5 digit number. ex: 2 ^ 55555 2 ^ 99999 etc ... Please help me [B]coding:[/B] C [B]Compiler:[/B] DevC++

Member Avatar for prvnkmr449
0
4K
Member Avatar for vskumar19

Consider a single linked list with 'n' nodes and other single linked list with 'm' nodes At the 'k'th node in 'n' ,the second linked list merges at some part of it .. jst like the shape Y Now i was asked to find out the address of Kth node …

Member Avatar for vskumar19
0
112
Member Avatar for dasari.prasad

Can anyone clear this doubt..?? First C compiler program compiled on which compiler..??? [QUOTE=soumya.ranjan;1299650]void main() { int x=4,i; i=fun(x=x/4); printf("%d",i); } int fun(int c) { return c/2; } the answer is 1...how??please reply ....[/QUOTE] that prog doesn't give output 1. definitely output will be 0 only. because fun returns 1/2 …

Member Avatar for Narue
-1
129
Member Avatar for amit kithana
Member Avatar for sree_ec
-1
162
Member Avatar for malvi

Hello I am totally new in this mircocontroller programing filed. I am using a PIC 16f690 and trying to use a HCMS-2903 display. I have to write a program which can display characters, coming in ascii value. Please provide me code example and with instructions how to connect that hcms …

0
77
Member Avatar for NicAx64

hi, Does someone have a good books(if free fine but commercial even oky) on code reviewing and industry c++ projects? I mean how I could do a professional code review according to the industry standards? I need to read a one and want to listen from the experienced ppl in …

Member Avatar for chococrack
0
189
Member Avatar for shankarz

The graphics.h header file is not running in turbo c++ 4.5, why? [CODE]#include<graphics.h> #include<conio.h> void main() { int gd=DETECT, gm; initgraph(&gd, &gm, "c:\\turboc3\\bgi " ); circle(200,100,150); getch(); closegraph(); } [/CODE] Please give me a link to download c-graphics tutorial?

Member Avatar for shabbaz_paras
0
120
Member Avatar for PriyaJaiGanesh

[FONT=Arial Black]hai![/FONT] (1)I have problem in deleting a record from a file. I was told that the only way to delete a record from a file is to copy the file to another temporary file and then copy the records to the same file again by skipping the record that …

Member Avatar for snivas519
0
9K
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 …

0
89
Member Avatar for Mouche

Hello, I'm working on a project in C to practice before I take a class this fall that requires C. I decided on making a task list. First, I'm starting with a cli interface, and then I hope to move it to GTK+ since that would look better and I …

Member Avatar for Mouche
0
612
Member Avatar for DAlexNagy

I am writing a GUI in GKTMM for my own learning experience and to use on a personal project I have at home. The data will be stored in a MySQL database on a server I already have running in my home and which I use for some PHP/JavaScript code …

Member Avatar for DAlexNagy
0
160
Member Avatar for sankhamita

Hi all! Please give c code which finds the included header files of another c file

Member Avatar for Adak
0
118
Member Avatar for viji.cs

[B][COLOR="Green"]How to convert a three dimensional string array into integer?[/COLOR][/B]

Member Avatar for Adak
0
191
Member Avatar for george61

Ok I have a linked list which have to read from binary file and to write in binary files. This is the function about the reading from keyboard: [CODE]short readElement( Node * newE) { int b,e,m; if ( newE == NULL ) return 1; do { printf("\n Registration number:"); scanf("%s", …

Member Avatar for prvnkmr449
0
3K
Member Avatar for Babaty

Q1: design a system that will read students information, display them in a table form, and implement some operation on them. The system must show the following: ========================================================================= Do you want to add new students? Do you want to display the student information? Calculate the average of the final marks …

Member Avatar for prvnkmr449
-3
117
Member Avatar for poulami510

Write a C program to find all real roots of a polynomial equation of degree n using Bisection method. Note that you can’t define the function as macro or C-function inside your program file. You have to take the polynomial function and degree from user. Also you can’t define the …

Member Avatar for prvnkmr449
0
116
Member Avatar for gudads

#include <stdio.h> void main() { printf("hi"); } ..................... #include <stdio.h> int main ( void) { printf("hi"); return 0; } .............. q1: What is the diff in two codes? q2: I am habitual of using code type 1 ( the first code), is it ok to follow that way?

Member Avatar for gudads
0
117
Member Avatar for atomic33

write a problem that take 10 integers from the user put in a table then calculate the min,max and the average and print it on the screen

Member Avatar for Ancient Dragon
-2
113
Member Avatar for perroned

Hello DaniWeb, its Danny here :-) In my program I will open several web pages in IE or default browser. I already know how to do that. But I wuld REALLY like to be able to open a URL in an already open page. Like instead of always opening a …

Member Avatar for ToRtUgOxX
0
70
Member Avatar for jigglymig1

i'm new to c# so i don't know how to use a for loop to increment my nums. num[i] apparently doesn't work in c# [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int num1; int num2; int num3; int …

Member Avatar for Momerath
0
201
Member Avatar for challarao

Hi! The following program gives the integer value of char string as output.Suppose if we give "1998",it will give integer 1998.In [CODE]i=i<<3+i<<1+(*string-'0')[/CODE]I understood that it will multiply i by 10,but in *string-'0' I don't know what is going there..?.Here what refers string is it index in 1998 or whole 1998. …

Member Avatar for Ancient Dragon
0
119
Member Avatar for rapids79

Hi, I have written a code which when I debug gives the following error: Windows has triggered a breakpoint in Test_1.exe. This may be due to a corruption of the heap, which indicates a bug in Test_1.exe or any of the DLLs it has loaded. This may also be due …

Member Avatar for Ancient Dragon
0
144
Member Avatar for malvi

Hello I am totaly new in field with microcontroller programming using c. can anyone help me out by suggesting good tutorial?

Member Avatar for Adak
0
254
Member Avatar for paula_m

Hello, I just starting with C and I am having a problem that I can´t understand. Here is the code: #include <stdio.h> #include <string.h> #include <stdlib.h> FILE *M; M=fopen( "m", "r"); char line [ 540 ]; long int i=0; struct estr_reg { char *molid; char *molc; }; struct estr_reg reg[6]; …

Member Avatar for samkaraja
0
214
Member Avatar for lonely_girl

hi everyone!!! ive just got an assignment from my teacher to make some graphics in C and i know nothing about it,can someone plzzzz help???? reply as soon as possible...plzzz

Member Avatar for Adak
0
258
Member Avatar for lapunluyang
Member Avatar for NicAx64
0
207
Member Avatar for challarao

Hi! The following program gives the integer value of char string as output.Suppose if we give "1998",it will give integer 1998.In [CODE]i=i<<3+i<<1+(*string-'0')[/CODE]I understood that it will multiply i by 10,but in *string-'0' I don't know what is going there..?.Here what refers string is it index in 1998 or whole 1998. …

Member Avatar for Ancient Dragon
0
105
Member Avatar for titan_31

I wrote this simple program in C to generate binary search tree, but i am unable to go beyond level 0. Note that I have not incorporated the printing part. [code] #include<stdio.h> #include<malloc.h> struct node { int data; struct node *lc; struct node *rc; }*start,*link,*tmp; int a[100]; int main() { …

Member Avatar for Narue
0
177
Member Avatar for Swapnil.Kamale

Hi all, I am making project on C# in ASP.Net & I wanted to use Excel or Adobe reader in my project by linking. If you have any idea about this pls let me know. Thank you.

0
20
Member Avatar for Kakashi Hatake

i am in search of a book for data structures using C. Anyone can recommend me one?

Member Avatar for Ancient Dragon
0
77
Member Avatar for Danny_501

Hi all, I need to convert a char array to an int. But the char array has regular characters in them('A', 'B', 'C'...) and numbers. how would I omit those characters and extract the number, then store it as an int. any help would be great thanks.

Member Avatar for Ancient Dragon
0
204
Member Avatar for babaidebnath

Hello guyz, Recently I am making a system monitoring tool. For that I need a class to monitor print job. Such as when a print started, is it successful or not, how many pages. I know that I can do it using winspool.drv. But dont how. I've searched extensively but …

Member Avatar for Momerath
0
269
Member Avatar for baby_c

hello friends...i need some help again.it's little hard to understand that whats the use of ungetc() function.Can you people explain that with some examples.please..i'm still learning.And new to this stuff..

Member Avatar for Adak
0
113
Member Avatar for Uvais

Could You Please Explain me what is memcmp? What does the 'size_t' means to?

Member Avatar for prvnkmr449
0
157
Member Avatar for Danny_501

Hi all, Why do I get a fatal error when I try and free this memory? [CODE] char *timeBegin = (char *)malloc(sizeof(char) * 21); timeBegin = time_stamp(); sleep(1); char * test; test = calc_time_difference(timeBegin); printf("%s", test); free(timeBegin);[/CODE] time_stamp() returns a static char array. Would this be the cause?

Member Avatar for Narue
0
121
Member Avatar for Auraomega

I'm in the process of coding my own OS and right now I'm working on a stdio lib but was just wondering about fputs and how it should write to the screen, which would be a better approach? Making stdout a file descriptor and having puts call fputs with the …

Member Avatar for Auraomega
0
102
Member Avatar for johnsign11

Hello friends Can anyone tell me Why and How to use vector in C++ ???? Making a sudoko game in c++

Member Avatar for manojwali
0
159
Member Avatar for rahul8590

The program is fetching me the right output but still i am getting a warning #include<stdio.h> #include<string.h> int main() { char *p,*q; p=(char *)malloc(25); q=(char*) malloc(25); strcpy(p,"hello" ); strcpy(q,"hi"); strcat(p,q); printf("%s",p); } Warning test7.c: In function ‘main’: test7.c:6: warning: incompatible implicit declaration of built-in function ‘malloc’ wat exactly is the …

Member Avatar for rahul8590
0
254
Member Avatar for kashtro Raj

I want to store images in oracle ..without using of Blob. i want using RAW fprmat. how? pls give details...........

0
44
Member Avatar for meer pakala
Member Avatar for smith32

Hi, I need some help from u again..... if we type: Enter Input : eee ddd cccc the result should be like this : sorting : ddd eee cccc but actual result is like this : sorting : eee eee cccc I don't know why... Can u help me ?? …

Member Avatar for Adak
0
222
Member Avatar for Rishikeshan

Mingw shows [code] ----- CurlT ( MAIN GCC DEBUG DEBUG_FULL BLITZ WIN32 ) curl.cpp C:\MyApps\CurlT\curl.cpp: In function 'void* getfile(std::string, char*)': C:\MyApps\CurlT\curl.cpp:39: warning: cannot pass objects of non-POD type 'struct std::string' through '...'; call will abort at runtime C:\MyApps\CurlT\curl.cpp: In function 'int main()': C:\MyApps\CurlT\curl.cpp:57: warning: deprecated conversion from string constant to …

Member Avatar for vijayan121
0
216
Member Avatar for Nothing595

Hi, so im new to this website. I am trying to write a program that tells you if a number is prime, but i have an error message that keeps popping up saying : error C2447: '{' : missing function header (old-style formal list? Here is my code: [CODE=C] #include …

Member Avatar for prvnkmr449
0
159

The End.