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

how to run this program in do while loop

Hi, I want to run the below program in do while loop, please help me. #include<stdio.h> int main() { int num; char another; do { printf("enter the number"); scanf("%d", &num); printf("the square is %...

How do I fix this life function code?

Please help me to fix the life function code.  #include <stdio.h> #include <stdbool.h> //I learned that you need to add stdbool.h to make the bool function work - Chris int main(void) { printf("You will have lif...

main.c:18:8: error: called object sum is not a function or function pointer

Please help me to solve the error main.c:18:8: error: called object ‘sum’ is not a function or function pointer, below is the code: #include<stdio.h> int sum(int*a,int*b) { int s=0; s=*a=*b; return s ; } ...

How to calculate the ranking for students in a classroom using arrays only and sorting techniques

Hi there. I have a task to Calculate the ranking for students in a classroom. For example, if Remi's score is 14, Yan's score is 2 and Maria's score is 20 then Remi's ranking is 2 since he has the second-highest score, ...

help need please quick

Implement a C program that, using a modular structure, is able to handle simple strings. For that, implement the following functions. A function with the prototype int CountSpaces(char *str) that, making use of pointer notation on...

How to fix my code in C language programming

Hello i am doing an exercise that states:  A 3000 lb  vehicle travelling on a road at 100 ft/sec requires a force equal to its mass times its acceleration to stop ( F = ma). The acceleration is given by a=  (v_o^2-v_i^2)/2...

How to Count the Combination of Addition of Numbers in C

Jojo, Lili, and Bibi is playing game about addition. Of course, addition is not a big problem for those who understand about how simple the addition is. But, they don’t want to add certain numbers, but they want to count how many combinatio...

How to Print this Output in C Programming?

SAMPLE INPUT   3 9 2 5 SAMPLE OUTPUT   *################* **##############** ***############*** ****##########**** *****########***** ******######****** *******####******* ********##******** ***********...

How to Sort Names in Alphabetical Order Using Bubble Sort in C Program

Could someone help me write a C program that would let users to input names in any order, then displays the names, sorted in Alphabetical order. You may use any sorting algorithm like Bubble Sort, Selection Sort, Insertion Sort, et...

How to Get Root Node Deleted Properly in Binary Search Tree

#include<stdio.h> #include<stdlib.h> struct node {   struct node *right;     int data;   struct node *left; }*root=NULL,*new,*temp; int num=0,num1; void insert(); struct node *del(struct node *...

I Need Some Help to Implement Eulerian Cycles in C Language Program

Hello there! Well, i have a problem. a big one. I need to be re-examined in order to change my major at college. So, in order to do this, the following problem should be solved until 28 May .    > Eulerian cycles. Implemen...

How to Write popen() Simulating Function in C Programming?

Hi Friends!   I have a difficulty with a recent task. I have a very little programming experience and although I got myself familiar with each function and understand what each does, I can't somehow compose them together to a ...

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) http://canvas.projekti.info/ebooks/Algorithm%20Design%20an...

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

MPI_THREAD_MULTIPLE issues in C

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
                           OR                           
                           OR                           
Register

Sign up using

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