Join the social network of Tech Nerds, increase skill rank, get work, manage projects...

Solve Extra points in football (Probabilistic Game Strategies and Backward Induction)

The above example is taken from book Algorithms Design and Applications by Michael T. GoodRich (page number 336 to 338 in text book and in pdf it's from 354 to 356, section 12.4.2)

return address of local variable or array

in this code I am trying to return the address of local array(c[100]) ,complier was showing me error of returning address of local variable but when changed the datatype from int to static int it works fine.whats the reason behind this? #inclu...

Appropriate Partitioning

Given an array A of integers, choose 2 non-empty disjoint subsets X and Y such that ratio of sum of elements of X and Y is as close to 1 as possible. Given, Α : {a1, a2, .... aN} Find, X : {x1, x2....xK} Y : {y1, y2.....yM} ...


Has anyone ever used MPI_THREAD_MULTIPLE with thread intensive applications? All my applications hang and found that this MPI feature was only lightly tested and doesn't work in all cases. Does anyone have a workaround? Below is a simple a...

Christmas Tree Programm

Chirag is a pure Desi boy. And his one and only dream is to meet Santa Claus. He decided to decorate a Christmas tree for Santa on coming Christmas. Chirag made an interesting Christmas tree that grows day by day.      The...

How to print the data from my array?

I want to print a file with the data of this struct.    struct dados { char matr[50]; char ele[50]; float ela[50]; float final[50]; int freq[50]; float recu[50]; ...

c program to print all possible combinations of given input number or value ?

If user input is 183 then output should be 183 138 813 831 318 381.

I need help in a C code

Help me with the Logic of the question given below: You will be given a file with two lines. First line will contain two integers separated by commas(say X,Y). In the next line there will be Y number of integers again separated by commas. You ...

find the longest sub-arraythat all of its elements are less or equalA[i]

I have an array A[1,...,n] of positive numbers, for example: [1, 2, 5, 3, 7, 2, 8, 4] I need to build an array S[1,...,n] according to the definition: S[i] = max {k|ik <ji :A[j] A[i] and k i} It means ...

C issues with Xcode.

Hello Guys/Gals, I went to a 4 day C programming course in which I learned using windows. Now I'm using Xcode on my own MAC. I'm trying to practice some of the things I learned but having some small issues with Xcode. I wrote this C program t...

C Structure

Im a Network Admin and start Learning Programming,I start with C and reading a book. anyone can help answer and explain to me how to come up with it. 1.Write a structure that is to be used with a binary tree. The structure is to hold title na...

Encrypt a message

I have to write a function to encrypt a message given as a string input using the given encryption key. The function should output the encrypted message as a string to encryptedMessage in the argument list. The function prototype must be as fol...

What is best approach for error handling in c programming?

Hello Guys I am writing a program for error handling in c programming but I am confusing to choose best approach for handle error from if-else and switch-case. Please explain with suitable example and guide me best approach. Thanks in adva...

c programming error codes

can any body tell me c programming error codes i am not able to understand the things

Difference between variable declaration globally and locally

During my project work I was working on a code in which I was getting segmentation fault on initialization of two variables of float data type whose dimensions where 1000 cross 1800 for both of them, but when I declared the variables globally pro...

Comparing float with a value

Hi everyone, I was looking at two C programs given here below, attached in the question.txt file. I can't write my code here because in the preview section my code looks very ambiguous. These codes are giving different outputs but i was thinki...

How to tokenize the simple Hello World program of C/c++ language.?

Hello all. Can anyone help me to create a C/C++ program to tokenize the simple Hello World??

Floyd cycle detection

Can anybody tell me the complexity of Floyd cycle detection algorithm in singly linked list with proof.
Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: