15,551 Topics

Member Avatar for
Member Avatar for dzoch89

A problem asks me to make a printf statement which will print out the members of the struct given, I wrote a program to make sure I would get the right printf statement. [code] #include <stdlib.h> #include <stdio.h> int main() { struct house { 5. char style[40]; int rooms; float …

Member Avatar for dzoch89
0
80
Member Avatar for mingke

I have four arrays as input, then used it in a function that result an output. Then I sorted the output array. Next step, I want to find the index and the value of the input array that resulted the sorted array. I keep getting the wrong result. Here my …

Member Avatar for Salem
1
150
Member Avatar for anitha joe

Hello All, I have a C program where I have created a UDP socket and bound to a particular ip address and a port number. As the program proceeds, msgs will be sent to different clients using the [B]same socket, using the same port, but each has a different ip …

Member Avatar for anitha joe
-1
184
Member Avatar for Aelphaeis

ok, I have a very serious somewhat simple problem that I just can't seem to figure out myself. Simply put I want to make a program take the lines Hello How Are You ToDay and output ToDay Are You How Hello Using the End of data marker as a newline …

Member Avatar for Narue
0
289
Member Avatar for tuse
Member Avatar for shazzy99

hi, One of my freind is asking for bpsk modulator and demodulator. It's out of my domain knowledge and i'm not sure what is it about. Can you refer to some C language example codes of the above. will appreciate your quick reply thx

Member Avatar for jephthah
0
392
Member Avatar for Rama_Kamisetty

i want code for the follwing series 1 1 2 1 2 3 1 2 3 4 1 2 3 4 ..................n when we n as 2 it should display 1 1 2 when we gave n as 4 it should dispaly 1 1 2 1 2 3 1 2 …

Member Avatar for ramyasowbhagya
0
89
Member Avatar for Church

Well i was looking in the paper the other day and they have this Word puzzle with a bunch of letters used to figure out what the quote of some famous guy was. Basically they take every letter of the alphabet and just change them and print it out and …

Member Avatar for NeoKyrgyz
0
239
Member Avatar for Dewey1040

i dont understand why this isnt working ill post the code thats relevent for some reason no matter what numbers i enter it will just print out that the complex number is 0.00000... idk how to fix it heres the main function [code=C] #include <stdio.h> #include "globals.h" #include "complex.h" int …

Member Avatar for jephthah
0
171
Member Avatar for waphon

this is an Object-oriented solution between ourselves of ai technique. Ai standard database chiefly contain: Main, Noun, Verb, Preposition Create database: Main. Create table columns 3 D memory x-axis, y-axis, z-axis, Class mark Input condition X Y Z Expected result X Y Z Reporting demonstration X Y Z Object enantiopathy …

Member Avatar for ArkM
0
168
Member Avatar for kaku_lala

Folks, I know we can use unsigned/signed int and char to define our own Boolean type in C. We can either use 0 or 1 to distinguish FALSE or TRUE or use TRUE as anything which is non-zero. Why can't I use float data type to define my own boolean …

Member Avatar for Narue
0
181
Member Avatar for winrawr

What's the main difference between while(){ } and do{ }while() loops? From looking at it, it looks like the former evaluates before it performs the iteration and the latter does the evaluation after each iteration... is that correct? Why would I pick one over the other? Is it mainly just …

Member Avatar for winrawr
0
145
Member Avatar for dzoch89

I need help making code that will create 4 different output files. All I know at the moment on this topic is how to fopen/fclose and the stuff in between however fopen requires the output file to be available before the program stars to run. Mabey theres an fcreate function …

Member Avatar for s_sridhar
0
87
Member Avatar for Petrock6

Hello. I'm developing a encryption program. I'm testing with encryption right now. I use bitwise operators and also bitwise shifts. [OR [|], XOR[^], AND[&], NOT[~], right[>>],left[<<]] To add even more security, I went ahead and added bitwise shifts. Whenever I shift the numbers, they go over 256 [max int in …

Member Avatar for NeoKyrgyz
0
137
Member Avatar for schaffino

Heya, i'm learning c at the moment and have a project i need to complete. I'd like to start of by saying that the course i'm on is pretty poorly taught. They taught us scanf printf basic arrays basic structures and fflush which doesn't even work on my compiler. We …

Member Avatar for schaffino
0
105
Member Avatar for richardcyper

1.write a program segment that computes 1+2+3+...+(n-1)+n, where n is a data value. follow the loop body with an if statement that compares this value to (n*(n+1)) /2 and displays a message that indicates whether the value are the same or different. what message do you think will be displayed. …

Member Avatar for ArkM
0
132
Member Avatar for dzoch89

[code]typedef struct item { int number; char package[20]; char start[20]; char finish[20]; int weight; int distance; }ITEM; int i = 0; int num = 0; while(fscanf(ifp, "%d %s %s %s %d %d", &item[i].number, item[i].package, item[i].start, item[i].finish, &item[i].weight, &item[i].distance) != EOF) { num++; i++; } rewind(ifp); printf("\n\nnum = %d\n\n", num); [/code] …

Member Avatar for dzoch89
0
128
Member Avatar for wakeboarder1335

Hello, I am working on a project that involves creating both a client and server in C. The client must get from the user: A = int B = double C = int D = double Then it must send all the values to the server in one send. The …

Member Avatar for Ancient Dragon
0
114
Member Avatar for CoolAtt

hi all. i have read a text line from a file using [CODE]fgets() [/CODE]into a char array [CODE]char astr[30][/CODE] then i did [CODE]strcat(astr,"secondstring") [/CODE] The output of [CODE]printf (astr)[/CODE] is appearing on 2 lines instead on same line. plz advise me wat i did wrong. thanks.

Member Avatar for Aia
0
5K
Member Avatar for xponse

I w'd like tom Download Turbo C (window version). Can any one sugget any site, thank in advance :confused:

Member Avatar for ~s.o.s~
2
439
Member Avatar for tasosa

[code=language] #include <string.h> #include <stdlib.h> #include <stdio.h> /* uni() function takes an array an thier size.and it produce an array which is include unique element */ int uni(char *arr[],int size) { int unique = 0; /* The length of dst after removing duplicates */ int n=size; char *dst[n]; /* The …

Member Avatar for BestJewSinceJC
0
107
Member Avatar for vddmanikanta

Sairam to everyone Good morning I am using AVR Studio to compile MuCOS II onto Micrium site. Micrium is the provider of all MuCOS II an RTOS for various ports. I had the following error : ../../os_dbg.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'INT16U' Addressing this line: …

Member Avatar for Salem
0
63
Member Avatar for wakeboarder1335

Hello, I was wondering how I could connect to a server using the client that I wrote below, that requires a username and password. I'm a little confused when it comes to reading the man pages. [code=C] #include <arpa/inet.h> #include <errno.h> #include <math.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include …

Member Avatar for Ancient Dragon
0
89
Member Avatar for vddmanikanta

Sairam all I had hard time with this particular problem. I have downloaded from Micrium Website MUCOS a RTOS. I used AVR Studio,and try to build the OS. But unfortunately I encountered this problem: --->" __root" is compiler directive for IAR compiler and this tells the compiler not to optimize …

Member Avatar for Ancient Dragon
0
415
Member Avatar for kaku_lala

Folks, I have been told that there is one logical problem with this code. Basically, this is an implementation of the library function strcat(). The intended beahviour of this function to concatenate ct to the end of s. Return s. I could not find any logical problems with the code, …

Member Avatar for ArkM
0
131
Member Avatar for bemo55

Hello. I am trying to do a project with linked lists. It seems that everything is coded correct in my code to create new nodes and move my pointers and such. But for some reason my function that is supposed to print all the names stored in my list only …

Member Avatar for VatooVatoo
0
266
Member Avatar for kaos

Hi, im lookin for a c function which will take hex values stored in two different integer variables say TH1,TL1 . So say TH1 has FF and TL1 has 00,then i need a program that will convert the effective value FF00 to decimal ,ie 65280 stored in a variable say …

Member Avatar for VatooVatoo
0
91
Member Avatar for moiron

i need help making a password program. it lets the use input a password and check it if it is following the password rules, which are the following: must have exactly 7 characters, only alphabets and digits are allowed. i don't exactly know how to put that in an if …

Member Avatar for dmachop
0
172
Member Avatar for ngibson12

Hello guys, I am new to this forum, but I am sure I will be an active one as I am a computer science major. I am still kindof new to c programming and am hitting a major issue. I am writing a echo client server code and I am …

Member Avatar for jephthah
0
164
Member Avatar for BimanD

The End.