18,490 Topics

Member Avatar for
Member Avatar for Member #706110

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 Member #706110
0
380
Member Avatar for guru_iyer

I'm trying to do addition of matrices using pointers. But, in 3x3 matrix, only the first row of the matrix gets added, while the rest are zero. Please help me correct this. Thank You! My code is as follows :: [CODE] #include<stdio.h> #include<conio.h> int a[10][10],b[10][10],c[10][10]={0}; int i=0,j=0,k=0; int r1,c1,r2,c2; void …

Member Avatar for Adak
0
3K
Member Avatar for capsicum

Consider this code: main() { void postinc(); postinc(); postinc(); postinc(); } void postinc() { static int count=1; printf("%d", count); count++; } What will be the output? Make me clear of this static concept......... What happens to the variable count? I know that it actually retains its value between funcion calls. …

Member Avatar for Adak
0
298
Member Avatar for bnickerson

Hi, I am writing a program that is to behave as a web server. Both the client and the server code are on my laptop. Ideally, I should be able to type in 127.0.0.1: PORT/index.html in Firefox and the server code should reply appropriately. So far my browser and the …

Member Avatar for bnickerson
0
2K
Member Avatar for SHENGTON

Hello, good morning guys! I got a problem here with my submenus of Stack and Queue link list. When I try to add an item, it won't display and pop the items when I try to select the display and pop functions. Same as well with Queue. Can anyone help …

Member Avatar for abhimanipal
0
334
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
109
Member Avatar for radha.

This is the coding i have done bt its nt printing in 'H' pattern. Can anybody help m 2 print dis..?? This is the 'H' pattern i want 2 print : * * ** ** ****** ** ** * * Coding : #include<stdio.h> #include<conio.h> int main() { int i, j, …

Member Avatar for prvnkmr449
0
104
Member Avatar for bnickerson

Hi, I am writing code for a webserver and am trying to send a html file called index.html over a TCP socket. How would I do this? At the moment I am trying to read the contents of the file and then send them over the connection. However, the page …

Member Avatar for nezachem
0
432
Member Avatar for boiishuvo

I have many header files for stacks such as pushStack, popStack, destroyStack, etc eg //stacksADT.h file #include "P3-06.h" /* Stack ADT Definitions */ #include "P3-07.h" /* Create Stack */ #include "P3-08.h" /* Push Stack */ #include "P3-09.h" /* Pop Stack */ #include "P3-10.h" /* Retrieve Stack Top */ #include "P3-11.h" …

Member Avatar for Adak
0
4K
Member Avatar for JayNak

Dumb question; If I use the code snipit below, what happens if token is NULL ('\0')? char *token; token=strtok(buffer,':'); while (token) { statement 1; }

Member Avatar for gerard4143
0
66
Member Avatar for JayNak

Hi Everyone, Just joined. I'm from Central Wisconsin in the U.S. and I'm an IT professional with 27 years in the industry. I am primarily an Infrastructure person as I have supported AD, Networks, Win-PC/Servers, Tandems, VAX's, HP-Unix and AS/400s. Through it all I have had need to write code …

0
29
Member Avatar for SaiBalaji

How can i identify the error whether it is compile error or runtime error ?

Member Avatar for SaiBalaji
0
124
Member Avatar for ankur3000

Hey guys, i needed some help with this encryption-decryption program that i am trying to write, as you will notice, i am not very skilled or experienced but i want to grow naturally, so it would be great if you guys could point out the mistakes rather than suggest smth …

Member Avatar for Auraomega
0
142
Member Avatar for ToiNKieZ

Help!! how do you do this in turboC? when i add a space it doesnt show the following output example: [CODE]char name[50] printf("enter your name: ); (user input example is: Boris Ilyanovich Karpov) scanf("%s", &name); printf("%s", name); (the output is just: Boris) [/CODE] how do i get the following Ilyanovic …

Member Avatar for ToiNKieZ
0
146
Member Avatar for Danny_501

Hi all, I have a multithreaded program, one of the threads needs to listen for user input. I was wondering is there a way of checking for user input every few seconds or milliseconds, without having the thread hang on a fgets() function? Current I have: [CODE] while(keep_running == TRUE) …

Member Avatar for sree_ec
0
291
Member Avatar for corliss

Name: Corliss Job: Lead Programmer Location: Inbetween the black and green of the command line args. I am new to Dani and wanted to throw out my first post. Can Code: C#, C, C++, Java, TSQL & PSQL Hope to contribute soon.

0
47
Member Avatar for baby_c

hey friends..i'm trying to make a program to find the largest prime factor of a number of 12 digits.but i'm unable to figure out that what's the appropriate variable type for that.can u guys help me... [CODE]#include<stdio.h> int main() { int c2; unsigned long nbr=600851475143,lprime=2,prime,n=3; do { for(c2=2;c2<n;c2++) if(n%c2==0) break; …

Member Avatar for sree_ec
0
1K
Member Avatar for Clawsy

I have too make an application in C that uses a dictionary. I have 54000 words in a file, on per line and I need a way to handle it. - I first wanted to keep it in an array but as it's bigger that INT (32767) I cannot do …

Member Avatar for Adak
0
179
Member Avatar for sankhamita

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

Member Avatar for Adak
0
102
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
120
Member Avatar for saminder singh
Member Avatar for Adak
-2
222
Member Avatar for SaiBalaji
Member Avatar for Ancient Dragon
0
118
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
162
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
93
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
140
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
146
Member Avatar for sujith0071

Sir, i am in charge of a c debugging competition in our college..The copetiton has two rounds a prelims and a final round. I am need of some questions for the final round which is a practical round which has duration of 90 minutes . please do help me in …

0
27
Member Avatar for amit kithana
Member Avatar for sree_ec
-1
178
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
84
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
205
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
145
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
104
Member Avatar for Member #114542

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 Member #114542
0
675
Member Avatar for ashu2401

Hi, I was recently asked this question in an interview and I was wondering if any of you could help me find a better solution to this problem. The question goes like this: There is a function foo which takes two arguments: an array "a" of type int and another …

Member Avatar for arkoenig
0
358
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
137
Member Avatar for titan5

I have to prepare a project in Operating systems course. Does anyone have any ideas? It should contain 2-3 OS related parts like threads, processes, synchronisation, scheduling or something related to file systems. I read about writing a kernel but I think that would be too difficult for me and …

0
84
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
201
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
127
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
132
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
135
Member Avatar for gudads

I am learning java, in i know in C, when we use: float and double ... the format is : %f for float %lf for double. in java i don't understand why we use double rather than float?? and the format for double is %f !!! [LIST=1] [*]Can some1 explain …

Member Avatar for gudads
0
519
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
124
Member Avatar for ToiNKieZ

example output: Meter number is: 124123ABC231 "what should i use to define something like that.... TurboC newbie here...

Member Avatar for Ancient Dragon
0
91
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
135
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
155
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
276
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
287

The End.