15,550 Topics

Member Avatar for
Member Avatar for edrianjon

Hi guys, 1st year cllege student here. New on C Programming. My program's main unction is that it will display products with fixed cost and a person will just enter numbers and will be multiplied to the fixed cost. The product of those should be displayed correctly but in my …

Member Avatar for Learner010
0
119
Member Avatar for nitish.mohiputlall

The Question: Write a function main that prompts a user to enter the number of different items that he intends to purchase from a showroom.Your program should read for each item the quantity to purchase and the unit price then finally display total amount to be paid anyone help me …

Member Avatar for ddanbe
0
151
Member Avatar for pheonixkid

Hi i'm trying to study for c programming course midterm and there are few questions i have no idea why the answer is. could anyone describe why the answer comes out like these? #include <stdio.h> int main(){ int i = 3; if (((i+=3)&&(i++>6))||((++i>8)&&(i+=3))) printf("Yes. i is %d",i); else printf("No. i …

Member Avatar for deceptikon
0
118
Member Avatar for ddnpresident

I keep getting the error , "control may reach end of non-void function" What am I doing wrong here? I just dont get it right now! I know its something simple and small but I have been here back and forth for about 2 hours wondering what the hell is …

Member Avatar for ddnpresident
0
1K
Member Avatar for toniann.midori

I want to add numbers to an array using scanf What did i do wrong? it says expected an expression on the first { in front of i inside the scanf... void addScores(int a[],int *counter){ int i=0; printf("please enter your score.."); scanf_s("%i", a[*c] = {i}); }//end add scores

Member Avatar for deceptikon
0
298
Member Avatar for castajiz_2

The thing that i don t understand here is how can you put a FUNCTION that hasn t yet evaluated into a integer(will evaluate later but at the moment of the recursion it hasn t) into a int variable? Once n equals 0 the int smallResult will get populated but …

Member Avatar for L7Sqr
0
149
Member Avatar for Thundermax

Hello guys, how can I solve the following problem: I made a pointer that receives the position found by the function srtstr char * pon; pon = strstr (string1, string2); The problem is now, I need to know the position where the string 2 in string1 within the whole. anyone …

Member Avatar for Ancient Dragon
0
152
Member Avatar for emil_ham

This simulator works for: 1. First Come First Serve (FCFS) 2. Round Robin (RROB) 3. Priority (PRIO) 4. Longest Job First (LJF) 5. Shortest Job First (SJF) algorithms. The program is written for gcc linux compiler. In input file a sequence of processes coming to the systems included, where also …

Member Avatar for ElGauchoUTn
1
2K
Member Avatar for nitin1

hey,today someone asked me one question in my class that what is the fastest way to multiply a number by 7 ? I said yes you can use bit-wise operators. the code which i gave him is : int n=10; // for example n = (n<<3)-n; then he aksed me …

Member Avatar for rubberman
0
254
Member Avatar for Dhan_1

Reversal of words in a string. i.e., "Jack is a good boy" into "boy good a is Jack"

Member Avatar for rubberman
-1
95
Member Avatar for karma2you

I want my my program to look just like the one below (as in showing what guess # they are on ):I've been working on this for the past hour or so but I just can't seem, to get it right . Can someone help me? For example i keep …

Member Avatar for Ancient Dragon
0
274
Member Avatar for deceptikon

Hopefully I shouldn't need to explain what `gets` is or why it's easily one of the worst possible standard functions you could call in your code. In my personal opinion, the title for "holy shit, never use this function" is a tie between `gets` and `system`. I'll discuss the problem …

Member Avatar for rubberman
1
265
Member Avatar for Mehr Hassan

Hi, I have written a C program in Turbo C to load BITMAP image and now i am trying to send it over serial port. Kindly Help me how to send that image data which i already loaded in memory over serial port using OUTPORTB or BIOSCOM ? [CODE]#include <stdio.h> …

Member Avatar for rubberman
0
1K
Member Avatar for AlWreikat

I want to write a C code that reads billions of integers from a text file. Each integer is of length 10 digits (e.g. -2311872000). then I build a linked list to store these integers.how could I do that ?

Member Avatar for rubberman
0
531
Member Avatar for haresh.sankarraj

Hi members, This is a program i wanted to implement semaphore between parent and child processes which are trying to access a shared variable called counter ... i dont know why it is not getting incremented during the child process !! someone help please !! #include <stdio.h> #include <sys/types.h> #include …

Member Avatar for rubberman
0
2K
Member Avatar for pheonixkid

Hi i have an assignment to do in C language but i have no idea where to start with....could anyone give me a headstart where i should start?? i dont have much experience in C programming. i was given these information: (a) It was Monday on the 1st of January …

Member Avatar for deceptikon
0
225
Member Avatar for Raymond Albert

Hello! I'm having a rather difficult time because the concepts weren't very much explained in class for complex situations. I'm a bit entangled with the few if-else conditions I have... :( I've been trying hard to crack the case, but I think somebody really needs to see my work. Write …

Member Avatar for Adak
0
4K
Member Avatar for saurav2007

While creating a database..Is the data transfered directly from the user-input into the database or transfered to a buffer and final transfer from buffer to database is done..? Plz answer it..

Member Avatar for deceptikon
0
92
Member Avatar for policeachan

dennis richie made c language with only 32 keywords all the functions and statements are to be created by the programer. if so wher is the source code of "printf" "scanf" "cin" "cout" ?

Member Avatar for Nishant_2
0
1K
Member Avatar for toniann.midori

Ive spent almost 4 hours messing with this code trying to figure out whats wrong...to no avail. I keep getting zero as the total in the displayTripCost function at the bottom, i dont know if i messed up the pointers or what when i called by reference.... Please help!!! //Toni-Ann …

Member Avatar for toniann.midori
0
347
Member Avatar for deceptikon

A common task in C or C++ is to get a string from somewhere and convert it to an integer. "Use `atoi`" is a common suggestion from the unwashed masses, and on the surface it works like a charm: #include <stdio.h> #include <stdlib.h> long long square(int value) { return value …

Member Avatar for mike_2000_17
6
2K
Member Avatar for ankit94679467

There is a prison of health retarded patients in which each patient is allowed to move within the premises. Each of the patient wears a jacket which is embedded with a seven mobile devices wiz; accelerometer with positioning system to check the movement of the prisoner, heart rate calculator to …

Member Avatar for ankit94679467
0
135
Member Avatar for cwarn23

Hi, recently I have wanted to learn how to write Windows native binary code to make a binary script which in one form or another will display hello world. I am hoping to eventually create a more efficient compiler using this method but as you should understand already, this is …

Member Avatar for Schol-R-LEA
0
378
Member Avatar for Pashan

Hi guys I'm having major issues with this assignment of mine and I cant even figure out where to get started. Any help would be greatly appriciated. I must write a program that outputs that plays the game Hi Lo with a user until they decide to quit. The program …

Member Avatar for Pashan
0
2K
Member Avatar for logicslab

Dear pals, I installed Turbo c for windows 7 ultimate 64 bit , but it's not user friendly .When it use in full screen the mouse is not working . Any solution for it ? If you know any new C compiler setup let me know. Thanks, Anes

Member Avatar for deceptikon
0
389
Member Avatar for jessicaphillips

Hello people, I have this C programming assignment which I have no time to do as my Uni workload is too large. The assignment should take, if you are an experienced C programmer, no longer then an hour. I am willing to pay $30/£20 for anyone to help me. If …

Member Avatar for Schol-R-LEA
1
643
Member Avatar for panadol

Can anybody help me on how tO create 4 function for uno card game? 1. Create Deck 2.Shuffle deck 3. Valid selection 4. Play

Member Avatar for Dean_williams
0
83
Member Avatar for logicslab

Dear Friends, I am looking a small thing , I need a simple code to check the input whether it's prime , if not can enter same repeateddly upto get a proper value . Please provide a simple code snippet and help me Thanks, Anes

Member Avatar for logicslab
-1
371
Member Avatar for Hyperion101

Hey guys, I had to make a basketball score board, and I've run into some errors. Here's my code so far: #include <stdio.h> #include "genlib.h" #include "simpio.h" #include "strlib.h" main() { int t, tw, tp, r, rw, rp, j, jw, jp, f, fw, fp; printf("How many games did the Tigers …

Member Avatar for HiHe
0
378
Member Avatar for nitin1

Is there any alternative for clrscr() and gotoxy in gcc ? I am using system("cls"); to clear screen but it doesn't identify cls as a valid command whereas in cmd cls is working perfectly on windows? can anyone please help ? i am using gcc as my compiler and using …

Member Avatar for deceptikon
0
1K

The End.