15,552 Topics

Member Avatar for
Member Avatar for mailsteam

Can somebody give me the reason why the integer i is not getting incremented. Here is the code: main() { int i=10; i=i++; printf("%d",i); } and the output is 10. Here my doubt is that, i know that i is post incremented. Eventhough i is not incremented at the time …

Member Avatar for deng_cen
0
188
Member Avatar for kemboy

the problem with this is that after it accepts the four (4) integers it stop and dont go on to find the average. IS THERE ANYONE OUT THERE THAT CAN HELP. NUFF RESPECT TO ALL WHO TRY TO HELP. [code=c] //to calculate the average of 4 numbers #include<stdio.h> int get4ints(){//function …

Member Avatar for WaltP
-1
277
Member Avatar for ravenous

Hi there, I am trying to make a piece of code in C that: 1. opens a specified file, 2. Reads the data in the file and separates it into two arrays, based on the position of commas, 3. Converts the strings into doubles and then perfoms some manipulation on …

Member Avatar for WaltP
0
1K
Member Avatar for jerryseinfeld

I mean I can change [code] double d; d= atof("99.0"); [/code] this with %.2f to ---- 99.0 to 99.00 but how can I take from user an integer and change it %.2f??? what should I write in atof ???? anyone to understand ??? :)

Member Avatar for thekashyap
0
80
Member Avatar for zacory

I'm trying to make a simple IM program. I created a server and client that connects specifically to my computer using Winsock2.h I tested it and it works from my computer to my server, from my roommates computer to my server, the library computer to my server, but I had …

Member Avatar for zacory
0
85
Member Avatar for Sebouh

Hi all. This is my first post here, and i need urgent help with a programming assignment. I am working on an assignment which requires me to build a simple shell. My shell must handle simple commands with arguements and ones with piping and I/O redirection. The problem is i …

Member Avatar for Infarction
0
113
Member Avatar for ck1212

i need ur help to complete this assignment Write a C program which, reads from standard input, replaces all the occurrences of the characters supplied by the 1st command line argument, with the corresponding characters supplied by the 2nd command line argument, and writes the output to a file supplied …

Member Avatar for rowly
0
156
Member Avatar for nick048

Hi In the main I have declared a variable char string[100]; I need to construct this variable with a function and I have written the code: [code]char stringReceived(int sockDesc){ char unsigned c; char tmp[100] = " "; int i=0; int n; do { n = recv(sockDesc, &c, 1, 0); // …

Member Avatar for mariocatch
0
65
Member Avatar for ahad

Hi During writing a code, I need to define dynamic arrays several times, so I wrote the following simple function for defining a double 1D array: [code=c] /*---------------------------------------------------------------------------- Function for Difining 1-D Dynaimcs Arrays for Storing Double Values ------------------------------------------------------------------------------*/ double *allocation_1d_double(int size) { double *array; if ( (array = (double …

Member Avatar for Ancient Dragon
0
121
Member Avatar for jan1024188
Member Avatar for jan1024188
0
85
Member Avatar for sap.hit21

Hi all, I have faced some problem ina coding. What I have to do is just to replace all "big" with "small" from the string " The world is big. there are big cities. Bigger city mean bigger population. Towns are getting smaller". My code is [code=c] #include<stdlib.h> #include<stdio.h> #include<string.h> …

Member Avatar for sap.hit21
0
90
Member Avatar for pc0019

Hi I've just picked up a copy of SAMS teach yourself C in 21 days (I dont think Ill finish it that quickly) because I wanted to get into programming. I've worked through the first chapter, but keep enountering a problem: my programs exit before I can see what they …

Member Avatar for pc0019
0
126
Member Avatar for arfmal

Can somebody tell/show the example to me on how to declare struct in the class and to use this struct in object oriented environment effectively.

Member Avatar for iamthwee
0
69
Member Avatar for rowly

hey guyz, i'm trying to search each ar for matching characters in the buff, but I seem to be getting a buffer overflow. Can anyone give me any pointers, any help would be appreciated, this is my code: [code] #include <stdio.h> #include<stdlib.h> #include <unistd.h> #include <fcntl.h> #include <string.h> main(int ab, …

Member Avatar for Ancient Dragon
0
161
Member Avatar for mrjoli021

I have a csv file that I need to be able to read it into a struct array. I have read examples and they all match what I have. [code] [COLOR=#0000ff]void[/COLOR][COLOR=#000000] ReadStudents ()[/COLOR] { fstream infile; [COLOR=#0000ff]int[/COLOR] i; infile.open ("c:\\students.txt"); [COLOR=#0000ff]for[/COLOR] (i =0; i < 20; i++) { infile >> …

Member Avatar for mrjoli021
0
88
Member Avatar for nick048

Hi to all, In my little server program, I have this code: [code]i=0; charRecv = recv(nSocketDesc, &c, 1, 0); while (c !='\n') { mystring[i++]=c; charRecv = recv(nSocketDesc, &c, 1, 0); } // End while (c !='\n') mystring[i]='\0';[/code] 'c' are a sequence of char sended to server from a client and …

Member Avatar for Ancient Dragon
0
79
Member Avatar for kjpwa

Ok, so I know lots of people have posted about how to find prime numbers up to a certain number, and I can do that, however If I wanted to output a certain number of prime numbers so that the user inputs say 6, it would out put 2, 3, …

Member Avatar for ANUJ SHROTRIYA
0
823
Member Avatar for student86

I need help verifing. If you need more information let me know, but I am a beginner. Just need help with the verifyValue.cpp what kind of code or functions would you suggest. Thanks [COLOR=#000000]In options 1 and 2, the user will input the ID, Type, Description, Quantity on Hand, and …

Member Avatar for vijayan121
0
89
Member Avatar for rowly

[COLOR=#000000]Hey guyz, I'm stuck with this given, its bit hard I cant understand it just wonna know the logic ( no codes).[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Its saying write a C program which read from standard input, replaces all the occurrences of the characters by the first command line argument, with the …

Member Avatar for rowly
0
147
Member Avatar for mcklein_tunde
Member Avatar for sowmya nair

the problem is as follows: write a program:the array of integers indicating the marks of the students is given.u have to calculate the percentile of the student according to this rule:the percentile of a student is the % of number of student having marks less than him.for example: student marks …

Member Avatar for jimmymerchant
0
135
Member Avatar for ajaxjinx

Hey, Is there any equivalent of conio.h for Linux??? I basically want getche to work in linux.. Is there any alternate??

Member Avatar for ajaxjinx
0
143
Member Avatar for ssthrissur

[COLOR=#000000]C program to create a calculator. The program will accept an arithmetic expression (assumed to be valid expression of only +, -, *, /, 1/x, and % operations) from the user. Evaluate the expression and display the results. Including the above functions, this calculate should provide the temporary buffer (memory …

Member Avatar for WaltP
0
104
Member Avatar for ab3ad

hi i'm student in university i try to do my homework to simulate FCFS and RR i need ur help to tell me if my answer good or :sad: Qustion is: the project is to write a program to simulate FCFS and RR without having any i/o, all processes have …

Member Avatar for Salem
0
134
Member Avatar for maverick786

I am attempting to search a list to check whether an item is already present before inserting. I am having trouble with the pointers; I understand that I need to set the pointer to the start of list but I keep getting compilation errors. Can anyone help? Here is my …

Member Avatar for Lerner
0
76
Member Avatar for aaisha

i've been given an assignment to writet he coding for a calculator. more the functions,higher the score in the assignment! i'll use the switch statement nd read through math.h. wat other suggestions can u guys giv me??there isnt' any limit to the no. of inputs we can take! can ny1 …

Member Avatar for Aia
0
96
Member Avatar for techie82

Hello all I'm a fresher to Microcontroller programming. I have defined certain global variables that I need to store at consecutive memory locations, say starting from 0x8000h . Will appreciate if anyone can give me the syntax / instructions to go about the same. thanks techie

Member Avatar for Infarction
0
110
Member Avatar for best

i tried writing a program whose output would display the letter p in a (3 by 12) that is 3 rows and 12 columns, didnot succeed. could you help me

Member Avatar for Aia
0
83
Member Avatar for LieAfterLie

For some reason, newline characters seem to be using 2 bytes in text files instead of one. Is this normal? When I open a text file and look at the size, I get one more for every character I add, except for newlines, which add 2 bytes.

Member Avatar for John A
0
116
Member Avatar for addicted

:rolleyes: I need some one to define prime numbers for me A full definition, I am trying to write a program to determine wether a number is prime, print all prime numbers in a specific range ... e.t.c so i need a full definition of prime numbers, i know prime …

Member Avatar for Lardmeister
0
83

The End.