15,552 Topics

Member Avatar for
Member Avatar for mmcshmi11

I need to print out a number that begins with 7, without the seven. For example, print 71011 as 1011 or 701 as 01. I've tried many techniques and just can't get it to work. Is there a printf format that will let me print out everything left of the …

Member Avatar for invisal
0
111
Member Avatar for prljavibluzer

I need to write something like this, just plain and simple c. 1. Program starts and prints 5 news titles 2. You select one and it prints news body 3. after viewing you select close and select other one or exit program 4. after that it prints "sort by views" …

Member Avatar for WaltP
0
175
Member Avatar for awelex

Hi, I'm new here, so please be gentle :) For an application I'm working on I need to implement a callback function that takes a va_list as an argument. Inside that function, however, I need to pass the va_list (or rather all arguments of the callback function) to a function …

Member Avatar for Narue
0
256
Member Avatar for francisprite

I'm using Linux and I'm trying to send mail using C but I'm not sure if my code works: s_Mail[999] = "mailx -r \"Sender\" -R \"Recipient\" -s \"Subject\" -F \"Message\""; mail(s_Mail); This is the part that sends the mail...the -F for the message part is really hazy...

Member Avatar for francisprite
0
78
Member Avatar for poojagupta

My question is to calculate the mean of a comma separated dataset stored in a file. The program will be run on a system with no floating point library. Obey the following rules: 1.Maximum 100 values in dataset 2.Each data entry in the dataset is a byte (0 - 255) …

Member Avatar for Narue
0
111
Member Avatar for certem

Hello i have spent hours and days and couldn't find how i can make a variable that has rounded to 2 decimal digits. But i dont want to use myVariable.value....or myVariable()....styles. In the net i have seen something like BCD that is related for official accounting issues but i coudn't …

Member Avatar for John A
0
239
Member Avatar for ninaijanai

so here's the code. [CODE]#include<stdio.h> #include<conio.h> void main() {struct { char seat; }a[19]; int x,z; char y; a[0].seat='A'; a[1].seat='B'; a[2].seat='C'; a[3].seat='D'; a[4].seat='A'; a[5].seat='B'; a[6].seat='C'; a[7].seat='D'; a[8].seat='A'; a[9].seat='B'; a[10].seat='C'; a[11].seat='D'; a[12].seat='A'; a[13].seat='B'; a[14].seat='C'; a[15].seat='D'; a[16].seat='A'; a[17].seat='B'; a[18].seat='C'; a[19].seat='D'; clrscr(); printf("Flight Seat Reservation:"); printf("\n\n\n\t1\t%c\t%c\t%c\t%c", a[0].seat, a[1].seat, a[2].seat, a[3].seat); printf("\n\t2\t%c\t%c\t%c\t%c", a[4].seat, a[5].seat, a[6].seat, …

Member Avatar for Passmark
0
302
Member Avatar for cinger

[code=c] int main() { int a,b,c; a=b=c=1; c = ++a || ++b && ++c; printf("%d %d %d", a,b,c); } [/code] here the expression is considered from left to right. but the confusion of mine is: && has got higher precedence than that of ||. so ++b && ++c should be …

Member Avatar for gkbush
0
145
Member Avatar for nehamore

i am writing a pogram where i have to find out which all computers are up on my lan...for this i have called shell script program from my C code which pings to all computers on lan....now i want the shell script to return to the C code "1" incase …

Member Avatar for jim mcnamara
0
398
Member Avatar for rafikul

[code=c] #include<stdio.h> #include<conio.h> void main() { float a=6; clrscr(); printf("%d",a); getch(); } [/code] here the output is some garbage value.here the error lies in %d instead of %f.for float value the identifier is f.is this the proper answer of my question?

Member Avatar for VernonDozier
0
97
Member Avatar for gallantmon1
Member Avatar for nvnq

WHO HAS ALGORITHMS OF PROBLEM : PLACE k<=8 QUEENS ON THE CHESSBOARD SO THAT THEY CONTROL (EXAMINE) ALL CELLS OF CHESSBOARD 8X8. THANKS!

Member Avatar for technogeek_42
-2
145
Member Avatar for prljavibluzer

Well, this is what we got for writing this holidays at school using plain C and the most simple methods. Any solutions available? Create program for defining hierarchical file-system structure in which node can be file or subdirectory with limitation that file can only be a leaf. Capabilities that program …

Member Avatar for prljavibluzer
0
122
Member Avatar for neknek

hi, i'm new in this site.. i'm working on a airplane seat reservation program.. we were asked to design a program that chooses the users' desired row number and the desired seat number (or rather in this case, seat letter)... here's my code [CODE]#include<stdio.h> #include<conio.h> #include<string.h> void main() { struct …

Member Avatar for neknek
0
114
Member Avatar for woozyking

Say I have an infinite loop, and I want to start over or terminate depending on what user inputs. [CODE] while( 1 ) // start the inifite loop { printf( "Enter your number: " ); // prompt scanf( "%d", &operand1 ); // store user entered number into operand1 if ( …

Member Avatar for invisal
0
92
Member Avatar for gaurav2589
Member Avatar for esy928

Im creating a slot machine program and used the kbhit command to stop the reels. Right now im tryn to change how the program works instead of stoping it all at once i want the reels to stop one at a time (everytime a key is pressed one reel would …

Member Avatar for esy928
0
233
Member Avatar for wollacott

ok people i wrote this code myself. i just need your help so this program can accept any digits and print the decimal equivalent. i worte more than i needed too because i wasnt so sure how muchi needed. i dont think it works very well. i tried 1101 and …

Member Avatar for VernonDozier
0
139
Member Avatar for wollacott

Input an integer containing only 0’s and 1’s( ie. “binary” integer) and print its decimal equivalent. {hint: use the remainder and division operators to pick off the binary numbers digits one at a time from right to left. Just as in the decimal number system, in which the right most …

Member Avatar for WaltP
0
289
Member Avatar for kxh29

Hello All! I am running AIX4.3 UNIX OS. I am developing using the C-Programming Language. I have inherited code which creates a dialog box. [code] dialog(box_height, box_width, position_x, position_y, "message")[/code] The requirement [B][I]now[/I][/B], is to place a list of say numbers in the box and grow it dynamically. Problem is, …

Member Avatar for Ancient Dragon
0
129
Member Avatar for kv79

Hi ,i am creating some file and i need to open an exe file. Like this ,I creating preface application because installation of the game . So i need that when Computer finish the installation that he start another exe file who have nothing with my preface application. I using …

Member Avatar for zhelih
0
61
Member Avatar for sn_sundeep

Hi, Is there any way so that I call mspaint through my C program and edit the resolution or resize my photos? Sundeep

Member Avatar for Belrog
0
79
Member Avatar for jeme

i would like adding tow number by postfix when the inputs like : 5,7 then the out put: 57+ i hope there is recommendable code for that program

Member Avatar for Belrog
0
93
Member Avatar for kv79

Hi , How can i get access to ( .rc)file when i already load it(already start my program). I want to make some changes from main window. Thank you for your effort of reading .

Member Avatar for Belrog
0
98
Member Avatar for achillez

[code=c] #include <stdio.h> int main() { unsigned short i = 0; scanf("%u", &i); printf("%u", i); } /* int main() { unsigned short i = 0, j = 0; scanf("%u", &i); printf("%u", i); } */ [/code] hey try the above prog, cc short.c -o short then ./short enter a number, you …

Member Avatar for Belrog
0
140
Member Avatar for Ajuddy

/stores and retrieves data for two secret asgents [code=c] #include<stdio.h> void main () { struct personnel { char name [30]; int agnumb; int agent; }; struct personnel agent1; struct personnel agent2; char numstr[81]; printf("\nagent 1.)\nEnter name:"); printf("Enter agent number (3 digits): "); gets(numstr); agent1.agnumb=atoi(numstr); gets(agent2.name); printf("Enter agent number (3 digits);"); …

Member Avatar for WaltP
0
111
Member Avatar for francisprite

This is a piece of code that I can't seem to get right. Hehe. I've initialized the string "sym" to have the values '0' and '0'. I then call the function "cnvrt" and use "sym" in the parameter(not so sure if that's the right term) of "cnvrt". Since strings are …

Member Avatar for WaltP
0
96
Member Avatar for Maelstrom80

I bet the answer to my problem is hidden somewhere in these forums as this seems to be a fairly common question, yet after literally 2 days of searching for an answer I can't find it so please bare with me. What I'm trying to do here is to read …

Member Avatar for Ancient Dragon
0
127
Member Avatar for hallinan

Hello I'm doing a C project for College.It is a banking system where you take in customer name address etc, Print a statement based on a month by month bases.I need to use binary files I have two versions(well Attempts) of this project the one I'm having biggest trouble with …

Member Avatar for hallinan
0
533
Member Avatar for LisaLLL

I am trying to edit a string in c. I need to remove the last 84 characters from a string[400], insert text and re-insert the 84 character string at the end. No problem adding text or coping text in C, but I can't remember how to reorder/manipulate the text string. …

Member Avatar for Agni
0
65

The End.