15,552 Topics
| |
Greetings, Is there any way may be some tools to view and explore contents of .obj files (in a formatted or unformatted way) or an executable. Can we do it using gcc? Please guide. Cheers!! | |
Hi everyone, So I am writing this program that is supposed to do the following: Create a program that accepts a string from the user (not from the command line) and displays: 1. The string using upper-case letters, e.g. all lower-case letters are converted to upper-case letters 2. The string … | |
Hello, Could anyone assist me in starting out with pointers. I know that pointers direct to the memory location where a value is stored, but I am having some issues with understanding the concept with arrays. Could you suggest a simple startup code, where a pointer points to a memory … | |
Hi, Need help to write the below mentioned program. Create an employee struct with following fields EMP_NAME EMP_ID DOJ (Date of joining) Read in the values from a file and store them in the above structure. Print the employee details if an EMP_ID is given. Regards, Shaju | |
hello, i am trying to store some values in an array dynamically. doing this as i dont want to over allocate memory to my array. so the code goes as follows:: [code] #include<stdio.h> #include<stdlib.h> int *p; main() { int i; for(i=1;i<6;i++) { p= (int *)malloc(sizeof(int)); *p++ = i*i; } printf("\n … | |
I write a small program like following: 1, firstly create a process waiting for keyboard input commands(via getchar()). 2, secondly create a thread in the process waiting on a message queue. each time after the thread receive a message, it can handle the message but cannot print the log message(via … | |
This is a catalogue of some experiments on just two aspects of undefined behaviour. This was inspired by yet another long bout of explanation in a recent thread, so I thought it was time to dust off a bunch of compilers, and compare. This is the test code. [code] #include … | |
this is the code #include<stdio.h> void main() { int i; printf("%d, %d",++i,i++); } and following is the output 8429558, 8429556 | |
Hello, i can not quite figure out how to write a function to take numbers from an array and sort so it displays even numbers first and then odd numbers. the output should look like this: [QUOTE]Original: 9 8 7 6 5 4 3 2 1 Reversed: 1 2 3 … | |
I'm a .net programmer so forgive me if this is a stupid question, but here goes. I'm working with a vendor to interface our system with theirs. We are sending text data via modem. The protocol specifications they have given us require a checksum value to be appended to the … | |
After going through lots of stuff about declaration and definition,in a nutshell I understand that the difference is in the memory allocation. In definition yes and in declaration no memory is allocated. Fine ,Is there any process that shows that yes [code] int a; //which is a definition [/code] allocates … | |
Hi Everyone, I am having some trouble with the code I am writing. I am supposed to find the sum all ASCII codes in the string, omitting the newline character at the end of the user input. Here are the directions I am given: Create a program that accepts a … | |
Hi guys....i have a problem and I hope you can explain me where am I wrong... I am doing some kind of Breadth First Search (BFS) ("some kind of" because this is my first program to use this algorithm) I have an array of size 4^9 (262144 for those of … | |
| Hi, I already asked but haven't had an answer. What I am trying to do is to write a program which will read the data from the file into BST with the ability to search by surname (surname is the key). After sleepless nights I have managed to do something, … |
When i was runnning the graphucs c program in turbo c the program was terminated. I gives an error message as 16-bit MS DOS subsystem The NTVDM CPU has encountered an illegal instruction. CS:d000 IP:03e2 OP:ff ff eb 05 ea Please provide me the solution I also tried using dosbox.. … | |
Hi, This is a basic question that's why i am confused. When I do printf("%d",sizeof(long double)) in Linux(i am using a vmware) Ans:12 bytes in msvc 2008 Ans:8 bytes My underlying arch for both implementation is intel IA32. What is the reason if the arch is same.If the fundamental data … | |
Hi, I've just started using Netbeans 6.5.1, and I was wondering if you can run a single C file independently of the other C files in the project. This works for java. For example, you can run test1.java and test2.java independently in the same Java project. But it doesn't seem … | |
Can someone help me to write a code in C Programming that will ask the user to enter a PIN and if the PIN is entered 3 times wrongly the program should exit. Thanx in advance....... | |
I am new to C programming and have been using the GOTO all over the place until today when I was informed it is not preferred practice, and due to its adverse affects on debugging and maintenance should only be used in the rarest of cases. I can understand that … | |
/* File: Kilowatt-hours.c Calculate and print bills for the city company.*/ #include <stdio.h> int main() { int account_number; char code; double bills, kilowatt_hours, peak_hours, off_peak_hours; printf("Please enter Your account number: \n"); scanf("%d", &account_number); printf("Enter Your user code [R/C/I]: \n"); printf("R = Residential\n"); printf("C = Commercial\n"); printf("I = Industrial\n"); printf("\nCode = … | |
hey guys how would i figure out if a string has a number in it without using any aditional libraries? | |
Hello, having a bit of trouble with this. I am writing a program which sorts a sequence of numbers using a binary tree however i cannot to seem to get it to work; i belive it is something to do with passing the digits to makenode(). Any help would be … | |
Can anyone tell me whats wrong with the code. I get two errors. I dont know how to fix it [code] #include<stdio.h> typedef struct { int i; float f; } STR; void fun(FILE*, int); void main() { STR* sp; int x; printf("Enter number of record to be printed: "); scanf("%d", … | |
I need to write a function that traverses a general list and deletes all nodes that are after a node with a negative key. But I dont know where to start so can I get some help | |
what's wrong about this? why when i compile,it come out expected primary-expression? what is that? [code=c] #include<stdio.h> #include<conio.h> main() { float Lab,Mid,Pro,Quiz,Final,Total; printf("\nEnter your mark for Lab:"); scanf("%f",&Lab); printf("\nEnter your mark for Mid Exam:"); scanf("%f",&Mid); printf("\nEnter your mark for Quiz:"); scanf("%f",&Quiz); printf("\nEnter your mark for Project:"); scanf("%f",&Pro); printf("\nEnter your mark … | |
Hey everybody, I was trying to create a program that simulated the game "Mastermind" using numbers 0-5 instead of the six colored pegs. I have written out the code, and it seems to work, all except for the loop I have set to see if the user wants to play … | |
Hello, I am learning C, POSIX, and Unix. I am trying to write a code that wait until the child process is done then terminate, however, I do not know what to put in the while loop. [CODE] Parent function: signal(SIGCHLD, handler) while(child process is running) print the number of … | |
In this program i want to ask the cashier if the customer wants to buy anything else. Typically, Ask customer what beef product he wants to buy. Ex. 1 //Chicken Liver Ask customer how many kilo(s) he will buy. Ex. 2 //2kg (problem) Then ask the customer if he wants … | |
*sigh* Malloc get's me every time... Basically what I'm trying to do is read data from a file to populate a square array on integers. I'm declaring the array as 'int** matrix' in main(). I pass this to the function which handles reading the file (the parameter for the function … | |
This is a short summary of my project make two text files with random stuff in it and then make them into bin files and then merge them into one and u take two text files and combine into one text file the code is pretty damn long #include <stdio.h> … |
The End.