15,550 Topics

Member Avatar for
Member Avatar for dev90

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. …

Member Avatar for Sokurenko
0
296
Member Avatar for Gaiety

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 …

Member Avatar for mike_2000_17
0
124
Member Avatar for zur1ch

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 …

Member Avatar for zur1ch
0
98
Member Avatar for abhishek_ag

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. …

Member Avatar for emilo35
0
143
Member Avatar for mnewsome

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 …

0
76
Member Avatar for mohan_saini

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 …

Member Avatar for Ab000dy_85
0
128
Member Avatar for DarkMonarch

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 …

Member Avatar for DarkMonarch
0
242
Member Avatar for SalicBlu3

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 …

Member Avatar for m4ster_r0shi
0
129
Member Avatar for Perry31
Member Avatar for Sokurenko
0
61
Member Avatar for rover100

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())!=' …

Member Avatar for rover100
0
164
Member Avatar for Vish0203

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); …

Member Avatar for Sky_Flyer
0
193
Member Avatar for turkgames

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 …

Member Avatar for turkgames
0
179
Member Avatar for dippyes

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 …

Member Avatar for deceptikon
0
132
Member Avatar for prasanna123

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.

Member Avatar for Sokurenko
0
189
Member Avatar for dannyfang

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[] …

Member Avatar for Sokurenko
0
661
Member Avatar for Kerrai

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 …

Member Avatar for Kerrai
0
449
Member Avatar for mcjiwe

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); …

Member Avatar for mcjiwe
0
8K
Member Avatar for Mojtabarahimi

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> …

Member Avatar for Ancient Dragon
0
383
Member Avatar for raj874

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 …

Member Avatar for adityatandon
0
119
Member Avatar for sumanth.boss

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 :(

Member Avatar for adityatandon
0
372
Member Avatar for Jamblaster

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 …

Member Avatar for Jamblaster
0
206
Member Avatar for srinivasdama
Member Avatar for nullptr
2
361
Member Avatar for you2

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)

Member Avatar for pj.david_rajesh
0
14K
Member Avatar for Dean_williams

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 …

Member Avatar for Dean_williams
0
212
Member Avatar for Majestics

How can i ready physical layer of osi through c language? Is there any other language to perfom this task?

Member Avatar for DeanMSands3
0
265
Member Avatar for cossay

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; }

Member Avatar for Banfa
0
136
Member Avatar for iismitch55

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 …

Member Avatar for adityatandon
1
11K
Member Avatar for Vish0203

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**. …

Member Avatar for Sokurenko
0
285
Member Avatar for acsusf12

I have been working this program out with a very basic description of what it should do for days... Once I thought I figured out the right way to do it, and the compiler showed no errors, I tried to run it and it gave me some garbled symbols I …

Member Avatar for prestonk98
0
216
Member Avatar for vegaseat

I borrowed this from C#, where you can easily send output, that normally goes to the ugly black console window, to a nice looking Windows MessageBox with an OK button to close after you read your results. You can accumulate your output in a string to send to one message …

Member Avatar for nagendra_rao
0
864

The End.