15,554 Topics

Member Avatar for
Member Avatar for lisedaton

hi all!!!! im trying to do strcmp to a char in a structure and and char* and im getting a msg error: dereferencing pointer to incomplete type.... can somebody explain me what is that and give me an idea how to resolve it? thanx in advanced!

Member Avatar for Narue
0
131
Member Avatar for daudiam

In undefined cases, anything can happen, the program can crash, or unexpected results be thrown up. What happens is up to the compiler. In unspecified cases, the Standard has deliberately not defined the exact behaviour of a few things so that the compiler is at liberty to do as it …

Member Avatar for Narue
0
166
Member Avatar for daudiam

[code=c] printf ("%d",EOF);[/code] This gives me -1 [code=c]scanf ("%d",&a);[/code] [code=c]printf ("%d",a) [/code] where a is int (as EOF is an int), this gives me some junk value [code=c]printf ("%d",getch());[/code] This gives me 26 I've always given the input as ctrl+z (that's right, na!) What's the correct value of EOF ?

Member Avatar for Narue
0
139
Member Avatar for uzair ahmad

Hello, I have a problem of with game of life source code in C. I need a source code for game of life in C programming language Kindly send me a source code so that i can check my own source code.

Member Avatar for Ancient Dragon
-3
135
Member Avatar for xouy

Hello, I'm checkng whether a file has been modified or not in order to refresh the content... However, i need a couple improvements : - How do I test the return value of stat to tell if it failed ? - The returned errno numbers may change between glibc versions, …

Member Avatar for Salem
0
135
Member Avatar for johndoe444

Hi, I have this function to tokenize an input string: int tokenize(char input[], char* tokens[], char delimiter[]) {...} There are invocations of the function with different size of array. For instance, [CODE]char tokens[2][100]; tokenize(input, tokens, " "); char tokens1[3][10]; tokenize(tokens[0], tokens1, ":"); [/CODE]as you can see the token holder array …

Member Avatar for Dave Sinkula
0
111
Member Avatar for krishnampkkm

[CODE]int main() { printf("Enter 0 or 1 :"); scanf("%d",&i_choice); if ( i_choice ==0 ) for( ;i_count_1 < i_number;) {------- ------ } if (choice == 1) for( ;i <= i_number;) {------- ------ }[/CODE] Here I raed a user input ( 0 or 1) So as per i/p I've to change the …

Member Avatar for krishnampkkm
-2
132
Member Avatar for daudiam

I know that ++a is faster than a++ because a++ has to first store the previous value of a at some temporary location and then increment a and then return the saved value, whereas ++a simply increments a and returns the pointer to the incremented value. Since, both a++ and …

Member Avatar for nezachem
0
629
Member Avatar for moonw3ll

My question is: If i'm the customer, how can i edit the quantity shown on the overview so that i can afford to pay the totalprice(if i've ordered too much) and delete some on the overview if i want to delete it(really short on money). And if i'm the owner …

Member Avatar for moonw3ll
0
250
Member Avatar for daveoffy

I am working on getting a string into this function but there are already to many arguments. [CODE] char interface[10]; if (!(in = popen("iwlist %s scan","r"))) /*Need interface string here */ { /*to be added */ } [/CODE] I tried to add ",interface" after "r" but it said to many …

Member Avatar for daveoffy
0
157
Member Avatar for chiko987

Hello, i have a function that starts searching for all files that match the given file name and Recursively traverses itself into sub directories and does the same thing and when a file is found i should output its path starting from the first directory that was given to the …

Member Avatar for death_oclock
0
138
Member Avatar for Pamilerin

How can one make a program repeat a set of lines of code.like for example [CODE]printf("enter the value of x:"); scanf("%d",&x); for(i=0;i<1;i++){ value+= arr[i]*(x,i); printf("\n The value of the polynommial is %ld",value); }[/CODE] How can you make it repeat so that it continues to read x and give out values

Member Avatar for death_oclock
0
201
Member Avatar for johndoe444

Hi, I am trying to implement some distributed algorithm (minimum spanning tree) where each node is represented by a process running in a different machine. Each edge represented by a client server communication channel. Suppose host0 is connected to host1, host2 and host5. I create 1 server sockets in each …

Member Avatar for nezachem
0
179
Member Avatar for blue3hree

please answer me.show why my code does not loop and it repeats question number 1. [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> /*prints the ASCII art for "FAIL"*/ void ascii_fail(void) { printf(" /%c__%c /%c %c\n", 92,92,92,92); printf(" /:/ _/_ /::%c %c ___ \n", 92,92); printf(" /:/ /%c__%c /:/%c:%c %c /%c__%c\n", …

Member Avatar for zalezog
0
223
Member Avatar for jeffreyfenis

3. A taxi charges an amount of 25.00 pesos for the first 300 meters and a fix rate of 15.00 pesos for every 200 meters thereafter. Any distance covering the next 200 meters zone (or less) is still charged 15.00. Create a program that would input the DISTANCE in kilometers …

Member Avatar for Ancient Dragon
-2
88
Member Avatar for naiyer.hoda

when i am writing c program in turboC i encounter error as "unable to create exe file". how to trouble shoot this and why i got this error.

Member Avatar for Ancient Dragon
0
22
Member Avatar for sunshine24

Hi This my first c programme.It asks 5 objective questions and displays the result at the end. [B]But when i compile it and run, it asks only for variables A,C and E .It doesn't ask for the inputs to question no. 2 and 4.It only displays these questions and skip …

Member Avatar for sunshine24
0
161
Member Avatar for ShortYute

I am trying to search a file (I have searched the forums and have found some treads but they do not really help me to do what I want) directly using fseek and strcmp but its buggy and gives off by one errors and such. The reason I did not …

Member Avatar for WaltP
0
127
Member Avatar for johndoe444

Hi, Is there a way to set stderr such that it does not print on screen rather on file. I have spawned a couple of threads and they are dumping all the error messages on the screen like a maniac and giving me a headache. Some help would be highly …

Member Avatar for WaltP
0
76
Member Avatar for regist1

Hello. Could anyone tell me how to convert [B]roman[/B] numbers to [B]decimal[/B] numbers. Can anyone provide some example for it? Thanks a lot. regist1

Member Avatar for tux4life
-1
209
Member Avatar for kwixbit

Greetings. I need help making a dynamic array with 3 columns, the problem is that i don't know at run-time how many rows there must be allocated. So i need to allocate one row every time. I have this as code: [CODE] gchar ***servers_array = NULL; servers_array = realloc(servers_array, (detected_netstat_servers …

Member Avatar for Narue
0
166
Member Avatar for Iam3R

i am writting a program for finding the no of keyword ( occurances ) and operators occurances. i am taking the all the keywords in an array and all the operators in seperate arrays for each category of operators. char *kw[] = {"auto","break"..."while" }; char *Arth_op[] = { "%","*","+","-","/"}; according …

Member Avatar for Narue
0
82
Member Avatar for Iam3R

Hi, i have a doubt regarding conditional macros and undef directive. can i use undef for a function like - macro, by just specifying the name of the macro with out specifying the argument list as written in line 8. is the code correct with out these statements: [ICODE] #define …

Member Avatar for Narue
0
109
Member Avatar for JaiChand2

Please help with the following code,,, It is compiling though but During run its stating that [B]"Your code has stopped its execution with a non-zero (failure) exit value.This is generally due to run time Exceptions like Memory Access Violation and Floating Point Exception. Please check your code for run time …

Member Avatar for nezachem
-2
96
Member Avatar for anatz

hi,.im a first year student taking information technology, never mind where i am studying.,,,i just want to ask some tips to understand easily turbo c.,.

Member Avatar for gerard4143
0
74
Member Avatar for kelevra

Hi all... First post here, be gentle. I'm trying to get this to work, and there's no output. This is from the K&R book [v2] exercise 1-14, the prompt is in the header. I added comments for readability, and please comment on anything you believe needs improvement. Thank you for …

Member Avatar for jonsca
0
121
Member Avatar for moomeen

hello everyone .. im writting a C program that requires to insert integers from a text file .. the contents of the text file are: 1:2:4 4:12:5 13:7:5 1:20:4 how can i read each number and define it as an integer ???? please HELP !! [CODE] #include <stdio.h> int main() …

Member Avatar for mrnutty
0
80
Member Avatar for Eko

I have one or more functions separate from main() , that besides the return value , must also return the time it tooked to process. How can I do that ?

Member Avatar for motogeeeksatyam
0
120
Member Avatar for maqsood8797

BIQ-005-Accelerator You’ve been given an assorted set of gears. Each gear has a different number of teeth – the notches on a gear that interlock with notches on another gear to transmit speed. You have a couple of belts one coupled to an input and the other for the output. …

Member Avatar for ShortYute
-4
151
Member Avatar for marirs07

is it possible in c program to run two processes at the same time.For example i want to run a timer along with my application .The timer must be shown on the screen.Thanks in advance

Member Avatar for gerard4143
0
88

The End.