15,550 Topics

Member Avatar for
Member Avatar for tatendamiriam.mungombe

how to write a c program that allows the user to input grade and get the mark range using the switch statement,and the program only terminates when the user presses the esc key

Member Avatar for Arshad_2
0
123
Member Avatar for loserspearl

I am trying to read a file and follow instructions based on its contents, add them to a linked list. I have the all the file handling written but am still having trouble with pointers and linked lists. The instructions from the input file would go like this i n …

Member Avatar for Arshad_2
0
113
Member Avatar for doris_3

A variable of type double named area holds the area of a circle. Write a statement to output on the screen the area in two decimal places

Member Avatar for rubberman
-1
132
Member Avatar for brandon66

Hey guys, seems like im doing something wrong here 2 occurs 4198861 times* in an array of size 100, i need another set of eyes if anyone can point me in the right direction #include <stdio.h> //proto void printOccurrence(int countArray[], int countSize); //main int main(void) { //variables int arraySize = …

Member Avatar for Moschops
0
197
Member Avatar for Ahmad Imran
Member Avatar for Smn

I have created a sample program on C.When i try to run on a different system (win 7 64 bit) it is asking for x64 version of the file (of the executable file created ). P.S. - I am not talking about the compiler, but about the executable file created …

Member Avatar for mike_2000_17
0
3K
Member Avatar for Ahmad Imran
Member Avatar for Duoas
-1
96
Member Avatar for Ahmad Imran
Member Avatar for Duoas
-1
229
Member Avatar for mtatadotcom

hello friends, may anyone help me with a code in c for the mechanism of using an atm machine, conditions 1.acc balance starts at zero 2.do not use global variables 3.loop the main menu after every transaction until user presses exit 4.after every transaction user returns to the main menu. …

Member Avatar for chandrasekhar77
0
6K
Member Avatar for Rahul47

As a part of my assignment I need to solve a problem in which I have to take space seperated inputs. I have already done my homework and stuck at a point where I have to take space seperated integers when number of integers are not predecided i.e whether there …

Member Avatar for Rahul47
0
197
Member Avatar for My_1

I dont know if this a right place to ask but anyway here you go: I am trying count all occurrences word are that are in the file but i dont know how to do it but I can only do in like user have input in not from a …

Member Avatar for glenn_3
0
170
Member Avatar for nitin1

Can anyone give me an idea how to do this? I have a list(C++) of bytearray and I want to fire a post request to the server using CURL library? I have searched a lot and they say to set the CURL_POSTFIELDS but that requires a char * field. I …

Member Avatar for glenn_3
0
135
Member Avatar for better.atbcs

Can anyone please convert this to Javascript? function execute(array $ops) { $stack = new \SplStack(); foreach ($ops as $op) { if (is_numeric($op)) { $stack->push((float) $op); continue; } switch ($op) { case '+': $stack->push($stack->pop() + $stack->pop()); break; case '-': $n = $stack->pop(); $stack->push($stack->pop() - $n); break; case '*': $stack->push($stack->pop() * $stack->pop()); …

Member Avatar for glenn_3
-2
167
Member Avatar for Jack_11

Hello! I'm a programmer that mostly just writes code for operating system kernels, and device drivers. I was wondering how much most people would get paid for doing so.

Member Avatar for glenn_3
0
146
Member Avatar for Leslie_1

Sqlite is a single user database application. It has many capabilities. It would be appreciated if either a link to an example, or some sample code could be shown for creating, inserting and querying a database.

Member Avatar for glenn_3
0
100
Member Avatar for doris_3

Implement a C function that can perform addition of two 15-digit (positive) integers. As in C the maximum integer number that can be stored in memory is 2147483647 it is not possible to use primitive data types in order to add very large whole numbers. For this reason, you are …

Member Avatar for Jack_11
0
213
Member Avatar for Rimas_1

Hi, I need to read text from file and then as outcome show separate words, but shuffled. I tried few codes but non of these works for me. I'm getting output, but it do not shows words, but some signs only. I'm posting both codes.. #include<stdio.h> #include<string.h> #include <stdlib.h> #include …

Member Avatar for sneekula
0
209
Member Avatar for nitin1

I am damn confused between these two terms. Can anyone explain this using some example? Thanks in advance.

Member Avatar for mike_2000_17
0
2K
Member Avatar for nitin1

This problem is troubling me from so long time. There are N scientists, K black holes, and any scientist can query about radius, size and temperature of any blackhole. You have to answer three kinds of query basically: 1)Given Scientist queried for which blackholes,Given scientist queried for which attributes 2) …

Member Avatar for nitin1
0
152
Member Avatar for nitin1

int find(int x) { for(int i=0;i < n; i++) { if(a[i]==x) return i; } return -1; } int find(int x) { for(int i=0;i < n/2; i+=2) { if(a[i]==x) return i; if(i+1 < n && a[i+1]==x) return i+1; } return -1; } int find(int x) { for(int i=0;i < n/3; i+=3) …

Member Avatar for Duoas
0
209
Member Avatar for XodoX

When I have a simple server-client code, how do I get the client to send the server a time request and the server responds, and the client then displays the offset and the delay ? The communication should be in NTP. I think that means there are 4 time stamps, …

Member Avatar for XodoX
0
322
Member Avatar for lyons18

There is any way to create a program in C which will be able to translate words using google translate or bing translator? I've already downloaded curl library (Ubuntu 14.04), but don't know exactly how to start in pure C. I'm beginner programmer. Thanks for help.

Member Avatar for vegaseat
0
277
Member Avatar for avishekh.bharati

I am familiar with java. but now i want to learn either of these. so which would be better to learn??

Member Avatar for vegaseat
0
187
Member Avatar for CharAmel

Hi everyone! I am making a program in C where the user will input a month then the program prints out all the names of files created in that month. Right now I'm having trouble in printing the names of files. Here's a portion of my code. Can you help …

Member Avatar for vegaseat
0
254
Member Avatar for Vahid_1

Hi, Let's say I have an array of 10 elements. I want user to enter 9 numbers so that they fill arrays 0 to 8 (9 numbers). Now I shift the arrays +1. so array[0] is now array[1] and so on. Now I ask user to enter 10th number (fills …

Member Avatar for Vahid_1
0
5K
Member Avatar for krieg

Okay, so this is my current code: #include <stdlib.h> #include <stdio.h> #include <stdint.h> struct Display { int width; int height; char **array; }; struct Display *display_create(int width, int height) { struct Display *display = (struct Display *) malloc(sizeof(struct Display)); display->width = width; display->height = height; display->array = (char **) malloc(sizeof(char) …

Member Avatar for krieg
0
347
Member Avatar for CharAmel

Hey! I'm a beginner and I am making a code about getting the directory of a file, but I have something that I don't understand. What's the meaning of "./" in `DS = opendir ("./");` I have searched a lot of sites about C programming, but nothing gave me a …

Member Avatar for rubberman
0
135
Member Avatar for EdJones

What's a good book to learn C if you already know Python and are comfortable with computer science terminology? I'd like a book that is downloadable as a .pdf free of charge but an html book viewable online free of charge would be fine. Also, is there an advantage to …

Member Avatar for tabanpanoam
0
275
Member Avatar for nitin1

**With a 2^32 address space and 4K ( 2^12 ) page sizes, this leave 2^20 entries in the page table. At 4 bytes per entry, this amounts to a 4 MB page table, which is too large to reasonably keep in contiguous memory. ( And to swap in and out …

Member Avatar for Moschops
0
195
Member Avatar for masterinex

why this code not work ?? # include <stdio.h> void get_values(float *r, float *v); float do_calculations(float resistance, float voltage ) ; void display_answer(float current); main() { float resistor; float volts; float current; //explain_program(); get_values(*r, *v); current = do_calculations(resistor, volts); display_answer(current); } void explain_program() { printf("This program calculates the current in …

Member Avatar for rubberman
0
643

The End.