15,552 Topics
| |
hello how do i open zip and rar files with c ? which lib do u recommend ? is there any one lib that does both zip n rar ? im basically trying to open zip and rar files which contain pics and retrieve a string array of all the … | |
I am trying to produce a random walk solution but I get some strange results. Here's the code : [CODE] #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <time.h> int main (int argc, const char * argv[]) { // insert code here... char myArray[10][10]; char letters[26] = {'A', 'B', 'C', 'D', … | |
Hello everybody, I have spend the last 6 hours on trying to access a char * type within a static struct without success. I guess I use the pointers wrong but after trying "everything" I am pretty lost right now. So hopefuly someone of you can help me. I have … | |
my program is made to enter a matix,in which it finds all of the column`s minimum numbers which are[COLOR="Red"] >0[/COLOR] and then put them under the last row.i have sucseded entering the array and puting it out,but i think my IF is wrong somehow.I have tried initialising the last row … | |
hi everyone i need some example programs on UART in embedded c for atmega8 micro controller can anyone help me plzzzzzzz | |
[CODE]#include <stdio.h> #include <ctype.h> #include <string.h> #include <unistd.h> #include <libgen.h> #include <time.h> #include <errno.h> #include <ctype.h> #include <math.h> #include <float.h> #include <stdlib.h> static char * string_tok( char *str) { static char *next = NULL; if(str == NULL) { str = next; } else { next = str; } if(str == … | |
I have used typedef in my C programs previously many times. So it is not new to me. I was reading through a header file linux-2.6/include/net/iw_handler.h and found following use of typedef [CODE=c]typedef int (*iw_handler)(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); [/CODE]I was not able to … | |
Hi, I am using win2000 Operating system and using microsoft visual studio to develop my application and while running i am getting debug assertion failed error. | |
How is it possible to delete a byte ( char, int, double .. ) from a text file ? Suppose that the file.txt contains :"110Hello". And I want to delete "110" from the file leaving only the "Hello" part. How to do this without reading the whole file into the … | |
I am working on a control break algorithm in C, and part of this algorithm is to have while loop check for the end of file and whether two strings equal each other. the first string is a part of a typedef struct structure called 'record' [I]rec.state[/I], and the second … | |
Hi all, I want to send a file to my gmail over socket. Reading a file and writing it to socket is simple but actually I donot know how to implement SMTP over socket. Could anyone tell me how to do it ? | |
can anyone please give me c code for aging in operating system? | |
between merge sort and binary insertion sort which is more efficient?i know that theoritically both are nlogn search bt practically which will be better.that means if we plot the graph of number of comparison vs number of element in the list hose slope wll be slightly more than the other.and … | |
It's from my homework assignment Question 1) Based on the O notation, approximately how many swaps and comparisons occur when Selection sort is called on a worst-case array of length 8? a) 16 b) 64 c) 100 d) 800 Number of swaps = O(n) which is "8" and Number of … | |
Hello, I'm playing with win API functions readFile and WriteFile. Is it possible to open file using CreateFile in binary mode just like using fopen standard C function. I tried with function WriteFile to write string to a file but it seems that file is opened in textual mode. What … | |
I want to create a double pointer and make it point to an double dimension array, then output the content of the array through the pointer. However Gcc warn me that "assignment from incompatible pointer type". Just like this: [CODE]#include <stdio.h> #include <stdlib.h> int main() { int i,j; int **p; … | |
I wish to change the color of my printf statement. I use following code: [code]#include <stdio.h> #include <stdlib.h> void main() { system("color e"); printf("An enemy appears\n"); system("color c"); printf("This is an apple.\n"); }[/code] I wish to print the statement which is "An enemy appears" in yellow color and "This is … | |
Hello, i have 2 small doubts regarding pointers. 1)im trying to defererence 4 bytes as shown, and im initializiing each byte using a char pointer. But im getting runtime errors. Code [CODE] char a = 65; char *ptr = (char *)malloc(4); int *ptr1; ptr = &a; ptr1 = &a; *ptr … | |
This one is pretty strange (or at least I can't figure out what triggers it). I have the piece of code below, but there seems to be a bug with the second call of [icode]scanf[/icode]. It simply gets skipped. So the input should be something like [code] 10 3 fbfbfbfbfb … | |
hi can any1 send me the source code to the bellman-ford and djikstra routing algos please? regards, naveen. | |
Hello, It's been a few months since I haven't been able to launch Codeblock's debugger, when I launch the debugger I always get this (example): [B]Adding source dir: C:\Users\Me\Desktop\L2\SDD\TP2\ Adding file: bin\Debug\TP2.exe Starting debugger: failed[/B] I have tried: [LIST] [*]Reinstalling [*]Reinstalling (uninstall done using Revo Uninstaller) [*]Installing latest version of … | |
So I got this assignment to combine two arrays without using strcat(). The two arrays must be passed to function as parameters. The arrays need to be merged into one array in the function with dynamic memory allocation and then the new string needs to be returned back to main. … | |
I'm attempting to solve this for myself as this is homework but I can't get past the hurdle. I have an array that dynamically holds the pixels of an image (chars) in its second dimension (first being the image number). I first initialize my array variable... [CODE] unsigned char** imgSet; … | |
Am trying to write a program that read some question and answer in a text file and after displaying it in another text file and i want to make use of [COLOR="Red"]struct[/COLOR] in my program. How do i go about it using rand() to generate the question. Anyone one with … | |
Heres the assignment. 1. Declare a string, e.g. char str[81]; 2. Input a string from the keyboard (spaces included) using the (while statement while( while (str[i] = getchar() != '\n' ) adjusted so that it only inputs a certain number of characters ( in the above example that would be … | |
Would anybody be able to transform the following C code that uses while loops into C code that uses goto loops [code]while(i<10) { i++; j=0; while(j<i){ j++; printf("*"); } printf("\n"); }[/code] | |
[code=c] // ----------------------------------------------- mySquare( y1) // rcv'ing dbl = 4 { double x1=1 ;// valid, but impossible to reach. printf("\n SQRD incoming Y1: %d",y1); // shows 4 printf("\n SQRD return y1*y1: %d",y1*y1); //shows 16 x1 = (y1*y1); // ??? printf("\n SQRD return X1: %d",x1); //shows 0 ! return x1; // … | |
how do you fill an object such as a rectangle with a colour using setfillstyle(); ?? I dont want to use flood fill as i am having more problems with that.. |
The End.