15,552 Topics
| |
i have previously created time using mktime and stored it in file, now the problem is how can i call it back and read as standard time, not an array. this is because i wanna make use of difftime function. here is my code sample: int ex(){ int typ; printf("\n\n\nEnter … | |
Hi All, I am writing a program to find the number between 1 and 100 that has the greatest number of distinct divisors. Below is my code for the same. It is returning an erroneous answer, i.e. 8 for greatest number of distinct divisors and 4 as the number for … | |
How to calculate time complexiy of the following line of code using 'Big-O' or 'Big-OH' notation??? 1. scanf("%d",&n); 2. for(i=1,m=n+66;i<=m;i++) 3. printf("%d \n",i); 4. for(j=n/21,m=n/5;j<=m;j++) 5. printf("%d \n",j); I have basic idea but i am getting confused...So, please help me to calculate time complexity of each step, plus overall complexity. … | |
Hi, I know i am asking a question which can be googled and find lot of explanation. I have actually gone through many but none explained the ownership property completely. > Mutex is acquired by some process, only that process can unlock it how the other process/thread know that the … | |
So i made another Code in C in which i am making a program to stop working when the Licence has ended. The Program Runs but lets say the date its suppose to end on June 20, 2012 so it triggers the Stop of use of the program. This is … | |
Hi All, I am writing a program to find the smallest positive integer that has n or more divisors. My program gives me correct answer for input values upto 4 but it produces erroneous answers for input values above 4. For example, it gives 10 as integer having 5 divisors. … | |
Working with Visual Studio 2008 and accessing SQL Server Compact 2010. Following a programming book and have created a small contacts database. The next lesson requires that the database be dragged onto a form already created. Have not found success in getting the form and the database on to the … | |
Hi all, I have to interface an IC which is giving serial output bitwise from a single pin this pin is directly connected to a microcontroller i have to read this single pin to an unsigned int. i have written a function something like that but its not working. unsigned … | |
hey guys, im building a small prediction software, the GUI is in PHP and i want to do the data crushing in C. (sequence, matrix and multiple variables isolation) i know the basics in C, but im no C expert. Is it possible to pass from C to PHP other … | |
| Hi guys, I'm not sure how to enter new entries into an array that is full. scanf() allows us to input a number. array[i] allows us to put the number into the array The problem with int array[x] is that you have to define the number of values in the … |
Can any explain about variable argument and their parameters?? | |
Hi guys, im new to these forums and would like some help with two problems im having in my program to make crossword The crossword requires me to read 5 inputs in one line. word row column direction clue Problem 1- input I wish to getchar the first word while((answerInput[count][i++]=getchar())!=' … | |
i wrote a program to determine the binary digits of the entered integer. I want to implement it in other programs directly, instead of typing the same code again n again. Does anyone know? how to do that????????? #include<conio.h> #include<stdio.h> int main() { int n,a[20],i=0; printf("Enter a number: "); scanf("%d",&n); … | |
Hello, I have been working on a school project of Algorithms class. It is basically to create a C project to insert numbers into a binary search tree then order it and find the largest element. The largest number goes to the right node of the tree so it should … | |
Hello i need some help for a function that I'm creating, it should perform some of the fuctions of the operand "printf". The problem I have with the funcion, is that I am unable to read the "Float" and "Double" type parameters, also i want to create a function that … | |
main() { int i=1; printf("%d,%d,%d",i,i++,i++); } the o/p is 3,2,1. But how it is possible In which order does printf executes??why it is not 1,2,3. | |
Hi, I'm a junior computer science student and I'm currently new to this forum. Im having some problems understanding the code excerpt from a book (see code excerpt below). The code is suppose to delete characters from a string, based on the given prototype: void RemoveChars(char str[], char remove[]); str[] … | |
Greetings The quicksort i am building works for only aprox 50000 element in a list. If i go above that i will run out of memory and the program will crash. This is only when i use the median of three or left as my pivot element. When i use … | |
main.c #include <stdio.h> #include <stdlib.h> #define MAX_USERS 100 typedef struct Utilizadores{ char *login; char *pwd; } USERS; void ReadUsers(USERS user[]); int u = 0; int main(){ USERS user[MAX_USERS]; ReadUsers(user); return 0; } void ReadUsers(USERS user[]){ FILE *fp; fp = fopen("/home/Jiwe/Desktop/users.txt", "r"); while(fscanf(fp, "%s[^=]=%s\n", user[u].login, user[u].pwd) != EOF){ u++; } fclose(fp); … | |
Hi guys Actually i have problem to convert my C++ program to C! Because C is too old and unusable, i tried to find and read so many sources, but finally i got some errors. Anyone can help me?! Thanks Regards C++ Files: Main.cpp #include <iostream> #include <cstring> #include <cstdlib> … | |
HWND hwndt; hwndt = FindWindow(NULL,"Windows Task Manager"); here FindWindow funnction not work in c language its returns NULL yes i know i can use first perameter also but i wanna use second perameter titel in this function i use dev c++ compiler and also add to project user32.a lib tell … | |
When i Connect to Mysql using TURBO C++,im getting error unable to open include file mysql.h mysql_version.h mysql_con.h mysql_time.h i added the include files and set path . even then im getting error . help me :( | |
I can't tell why this piece of code wont work, but another one which I wrote does because they look exactly the same to me. Please tell me if you can see what the difference is because I cannot. I tried using the code snippet thing, but it doesn't let … | |
please answer the code for string to double and string to long in c bye | |
Hi, I have a requirement to convert a unsigned int 32 value to a IP address dotted format. Can this be done using a C function? Requirement: Eg: Input value = 3232235691 i.e 11000000 10101000 00000000 10101011 Converted to LAN Ip - 192.168.0.171 Please help.(Newbie to C programming) | |
Hello. I was searching on how to copy the string from the first point in the file to the index of comma -1. I have a .mrk file that i would be reading. My idea is that the loop will go through the file and find the comma. There will … | |
How can i ready physical layer of osi through c language? Is there any other language to perfom this task? | |
Can anyone explain to me why this simple program won't print anything? #include <stdio.h> #include <ctype.h> char * mkUpperCase(char *); int main(void) { char name[] = "information"; printf("%s\n", mkUpperCase(name)); return 0; } char * mkUpperCase(char *s) { while(*s != '\0') { *s = toupper(*s); s++; } return s; } | |
I have been messing around with making a windows application in Dev-C++ I wanted to make it in a single source file, rather than a project to see if it worked. It did, other than the fact that I got the windows app, AND a DOS prompt behind it. Is … | |
Hi everyone, I'm facing problem in deleting a node in **del()** used in my program. Suppose, i've added a city as **Delhi**, and at the time of deleting, i type the name as **delhi**, the compiler gives a processor fault. But, i want it to display the line number **95**. … |
The End.