15,554 Topics
![]() | |
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! | |
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 … | |
[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 ? | |
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. | |
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, … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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", … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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.,. | |
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 … | |
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() … | |
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 ? | |
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. … | |
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 |
The End.