15,551 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
Hi, What is the conversion character for long double in gcc? | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
[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] … | |
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 … | |
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. | |
I w'd like tom Download Turbo C (window version). Can any one sugget any site, thank in advance :confused: | |
[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 … | |
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: … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
|
The End.