18,490 Topics
Hi All, I want to write a generic function which takes in a void pointer and length as input and writes the data referenced by the pointer to a file. Another generic function which takes in a void pointer, length and offset and reads back the data to the memory …
i need to input a password but it should be printed as a special character..how can i possibly do that? thanks in advance for the answer and im sorry for the disturbance..im just starting studying this kinds of stuff..again..thank you in advance..good day..
I'm having a bit of trouble with this random number generation function. It's going to be part of a much larger program which requires lots of random numbers so I decided to use time as a seed. However I can't seem to get this to work. This code is virtually …
to make the programs more efficient, do i need to free variables which are declared locally in the functions? Are they not disposed when the function ends?
Hi, I have a question regarding fscanf. In my program I call [icode]fscanf(fp, "%15[^,],%d,%315[^;];", anum, &bal, cust)[/icode]. Everything works fine and there is no problem with the syntax, the only trouble I am having is that I need to copy the ';' as well into cust and use it as …
[B]I am developing one project in C language,In it several records are there... By maintaing those kind of records,I easily store the record name {For eg. filename 1 filename2 means i know how to store it by using 2 Dim. array but i dont know how to print it or …
How can I find the L.C.M of a series of numbers
hi i just visited n joined this community. Actually i had no idea about these languages n i wan to learn them starting from c will u tell me a good site or any suggestion how to learn
how can i arranged the input words alphabetically, like in the dictionary..[B][B][B]please help me....please!!!![/B][/B][/B]
C:\WINDOWS\PCHEALTH what is it and it is hogging the systems. I tried to delete but no access. Please help.
suppose i want to do shift left opeartion on x=1010 y=x<<1 it will shift left the value & make x=0100 but how can i store that shifted value... in other variable...? please help me to solve this query
A string is input which is both in uppercase & lowercase letters. How can I arrange the string so that all lowercase letters are in one side and uppercase letters are in another side.
How can I exchange 2 variables values without using any 3rd temporary variable.
Hi, when i run my program the following error occurs: "Unhandled exception at 0x00415b72 in testMatrix_size.exe: 0xC0000005: Access violation writing location 0xfdfdfdfd." and seems to happen over the line converting a string to double: n = Comma - Position; Numbers=line.substr(Position,n); Data[i][j] = atof(Numbers.c_str()); //problem is here. The program does the …
I'm trying to write a program which reads a file really small size with two number and a character and ouput another file which can have up to 120.000.000 characters. is unistd equal to direct system call function? and if yes is it the fastest way to read/write data on …
I am currently trying to write a program to compute permutations of the array [0,1,2,3,4,5], I need to save all the permutations to another array and I also need the first digit, 0, to be fixed. I have searched through quite a bit of literature on doing this, however I …
I'd like to implement a sorting algorithm(quicksort or bubblesort or mergesort... it doesn't matter. anything that sorts is ok) into my insert function, so that everytime i create a new element it'll be inserted into right position. The variable listptr is the pointer pointing to the address of the first …
hello, I have a matrix (string array that have words) and I want to write a function that receive the word and consider whether the word existed or not in the matrix I"m trying to write the function, but i didn't succeeded. this is my code [code] int CheckWord (char …
Is there a function in the Windows API I can use to get recent files opened by my application instead of just setting them? (Before you tell me; yes, I know it won't be hard to do myself.)
hi guys! How can I play mp3 / wav file using C language........ please help. Thanx in Adv.
Hi, I'm trying to write a program to archive, basicaly concatenate some files from a folder. The names of the files are obtained from the file_ls file which contains the result you get when you run ls -la in linux. It's lines of text like this: [CODE]drwxr----- 13 slobo slobo …
i have been using CreatProcess in my program to initialize another program with two command line arguments as C:\\Documents and Settings\\xyz.exe and 2 so the code i am using is [code=c] CreateProcess ( "C:\\abc.exe", " C:\\Documents and Settings\\xyz.exe 2", NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi ); [/code] but …
Write a C program to create a hierarchy of processes as shown in figure. Parent Child1 Child 2 Child3 Child4 First child process should display the information regarding users (users login, how many users etc). Second child should display system characteristics (the CPU characteristics, other system properties, memory, OS name, …
IThanks for previous help. I know the process of finding H.C.F. of two numbers. But how to calculate H.C.F & L.C.M. of a series of numbers? Please reply.
Can anybody help me with structures in C language coz i dont not know a thing and i have this assignment that is due next week wednesday.
Hey! I`m a computer science student, I have this problem!: I don`t know which programming language I should learn! I`ve already know a little c & c++ but I want to learn something completely and I don`t know what to choose!But perhaps I can use a little help here Wink …
Hi, I'm new here, I need help in assisting me to get rough idea on how the process of: "Writing C code of Motion Detection then plug-in it onto IP camera". Tq
have a very simple question: how can i write something into a .txt file? could write only few lines of code and got stuck. have no idea what to do next. can someone help? [CODE] #include <stdio.h> int main(){ FILE *textfile; textfile = fopen("test.txt", "w"); return 0; } [/CODE]
Hello all, im Mehh and this is my first post. Im also a rookie in programming and im making Multi Document Interface program from a MDI Example in DevC++. My problem is that i cannot change Font Size in MDI example and its so small that my friends cant even …
I want to display a charactar in x,y coordinate in console.Please help me!?
hi this is pravallika doing my final year.presently im working on designing an algorithm for adaptive call admission control. I have written my program in C. 1. Is there any software to convert C to Matlab 2. Does Matlab support flags? if so how?
Hiii... I have got to do a project on thread shceduler...as the name says its purpose is to schedule various threads... i have to do it in c or c++ as i don't know java... I am very much new to this....I have searched in books and surfed in net …
hello, i'm trying to write a function in C that finds two subsequences that thier sum is equal. hope you can help me. thank you!
hey, i made this a few years ago. i want to take the error when u enter a different number and would like to make it more compact. can you guys help me make it smaller. this is a 8 bit binary to decimal converter. [code=c] #include <stdio.h> #include <string.h> …
Have to write a program that mimikes a grep. It has to search thru a given file for a certain pattern. I have no idea where to start. Help please.
I want to know how can we interface compilers so that we can mix up many languages together but still the code should work. One of my thoughts is, if there is any code in C allthose codes must be taken apart and must be compiled by C compiler and …
Hello, I have a question, How I can write a function that return 2 values. the function should take 3 numbers and do between the first and the second number an arethmetic operation and check if the result will be the third number, if yes the function return 1 and …
Hi, i am working on scheduling of threds...i am having a thread library different from pthreads. I wanted to switch b/w the threads. Its possible for me to switch, if thread finishes its execution, using signals...but when a thread doing its execution (for example if thred contains an infinite loop), …
Hi! I am trying to make a function, which transposes matrix. When declaring it, i get this error, which i mention in the title. I`ve tried to find the solution myself, but i am quite new to C, so i don`t even understand what does this error mean. (I know …
I'm creating a program that is supposed to have enumerated constants that contain days of the week. I am also supposed to have a variable called today that is of type week. Okay, I think I have done all of that correctly. Now I am supposed to assign a value …
:idea: Anyone have C source code program to change the system time in Linux ? Please share me!!! Thank!
hi ppl... can u please help me with this program.. i dont get how to do it. I tried hard but dont' get it.! thanks Suppose that $ 1000 is deposited in a bank account that pays interest at the rate of 8%. if interest is paid annually, at the …
If we consider a pointer variable if takes size of 2 bytes and it can carry max address value of 65535 but actual address are larger than 65535 , how it is able to manage these address..... will u please explain me.
[code]I have used outportn(base,pin); cmd with header file dos.h and as per my knowledge there are no errors in the program. BUT ITS NOT WORKING for crazy it worked ones in my friends computer and never worked again ... What should I do ??Please help me I use XP. [/code]
[code] FILE *infile; infile = fopen("coords1.txt", "r"); int num = 0; for(int num1 = 0; num1 < 5; num1++) { for(int num2 = 0; num2 < 4; num2++) { for(int num3 = 0; num3 < 3; num3++) { fscanf(infile, "%f", &num ); targetCoords[num1][num2][num3] = num; } } } [/code] I'm …
Hello, Im trying to insert some integers to make a sorted list. I am using cursor-based. Here is the function: [CODE=c] void insert_sorted(virtualheap *vh, list *l, int x) { int temp, *p; if(vh->avail != -1) { temp = mymalloc(&(*vh)); vh->h[temp].elem = x; for(p = l; *p != -1 && vh->h[*p].elem …
I would like to say thank you to all the contributing members of the forum. Daniweb has been the result of many late night google searches and has provided some valuable knowledge to myself and I'm sure countless others. I'll start by saying I'm no _real_ programmer. I've played around …
Just wondering, since assembly code is more or less what every other language is compiled into, would it be useful to learn how to do things in assembly before learning say, C or C++, pascal, python, etc? I am already fluent in Visual Basic but I want to get to …
Hi any one please tell me why the warning is generated when the address of pointer to a local variable is passed. [U]The following is the warning generated:[/U] Icore.c:228: warning: passing argument 3 of foo from incompatible pointer type [U]The function declaration is:[/U] int foo(void * , int , void**); …
Hello, I am having a diploma project about building a LAN Monitor, in wich I need to capture the traffic from network card at low level layer. More like Data-Link layer. Can anyone help me with a suggestion of a function or a method to substract bit packets directly via …
The End.