19,876 Topics

Member Avatar for
Member Avatar for Phil++

Hello, I'm wonder what static references are. Are they like: [code] static int number = 0; [/code] I'm really confused. Thanks for any help.

Member Avatar for Phil++
0
150
Member Avatar for itslucky

Dear Friend, i have a crystal report, in which i have amount of Different Items, now i want to calculate total amount of all that items and show Total Amount at the end of the Report. so please tell me how can i calculate Total amount of different items in …

Member Avatar for itslucky
0
90
Member Avatar for hosh

Hi, can anyone help me to solve this problem? I have this code: [code=c] FILE *in; char i =fgetc(in); int perm=0; perm =atoi(&i); printf("%d\n", perm); [/code] if first character in my "in" file is 2, the output is 28; if ------------------------------- is 3, -------------- 38, and so on... any ideas …

Member Avatar for hosh
0
135
Member Avatar for Lohith_prakash

Hi, I want the program code for the below question. Write program to create a class called Student including functions like get_data() and put_data() to get marks of student and display it. Thanks & Regards, Lohith

Member Avatar for Ancient Dragon
-4
52
Member Avatar for Aakriti

How to pass array of pointers to structures using functions in C? #include<stdio.h> #define dept_count 3 struct employee { char name[20], post[20]; int emp_no; int basic_pay; }; void search( struct employee * , char , int ); void main() { struct employee *deptt[dept_count]; int i,j,emp_count[10],dep_srch; char emp_srch[20]; clrscr(); for(i = …

Member Avatar for Tom Gunn
0
255
Member Avatar for seo2005

I am a beginner in c and would like someone tp help me . My question is why I have to write void before main to execute the c program. #include<stdio.h> void main() clrscr(); { printf("Hello") } This is a very simple program. But I am unable to execute it …

Member Avatar for tux4life
-1
183
Member Avatar for 50701735

please tell me about some my questions. if (we have a pointer *tmp)-> that my goal is assign that pointer for another pointer ** temp ; so ,how do we assign for right sytax.

Member Avatar for dkalita
0
78
Member Avatar for mauryoung

#include <stdio.h> int main() { int age; printf("Please enter your age:"); scanf("%d", &age); if(age<100) { printf("You are pretty young!!!\n"); } else{ if(age==100) { printf("You are old\n"); } else { if(age>100) { printf("You are really old\n"); } } } getchar(); return 0; } the program just flashes wen i click run …

Member Avatar for mythilisrini
0
191
Member Avatar for comput

*Forgive the double post (in Computer Science thread too. As soon as I figure out which thread this should be in, I will be sure to consolidate and delete one.* I got this example in a handout in class, but am having trouble following...can someone kindly insert some comments? After …

Member Avatar for dkalita
0
1K
Member Avatar for darkw1sh

I am having a small issue I have to use only putchar and get char to get an operator and two numbers and print the format into num1 (operator) num2 I have a lot of code but I am afraid to post on the site because someone might steal it …

Member Avatar for darkw1sh
0
149
Member Avatar for logan59102

Here is my assignment: Write a C program that will reserve seats on an airplane that has 10 first class seats and 100 coach seats. Your program should be menu driven. If a seat of the desired type is available, your program should recored the reservation and display the seat …

Member Avatar for Beg.CProgrammer
0
350
Member Avatar for praya.k

I need a c program to implement evaluation of arithmetic expressions using stack with its output

Member Avatar for WaltP
0
43
Member Avatar for WethiL

Purpose of this program take base and two number then multiply that numbers in that base.I used Dev-c Shed compiler for gcc.It takes the numbers and base from text in the attachment.Please help....It doesnt have syntax error but it has logic error... [code=c] #include <stdio.h> #include <math.h> #include <malloc.h> #include …

Member Avatar for Dave Sinkula
0
113
Member Avatar for sudhansugupta
Member Avatar for briane010
3
166
Member Avatar for claire89

For example i have a stack of chars and i want to pop a word from the stack how do i know whem the word starts and ends inside a stack? I have a program who separates words and i want to eliminate the word from the stack thats repeated …

Member Avatar for MrNoob
0
96
Member Avatar for adobea

i need help with the code below. it doesn't give out the right output. the output is supposed to appear in a symbol table form #include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> struct instruction { char iden[10]; char name[10]; }in; void main() { FILE *fin,*fesym; int v1,v2,val,*cslth,val1,val2,c,d; char *id1,*id2,name2[10],v[10]; int csaddr=0,progaddr,temp1; clrscr(); fin=fopen("pass1.c","r"); …

Member Avatar for MrNoob
0
126
Member Avatar for Hoey33

If a person has a number between 1 and 100 in mind, you can always figure out what this number is by asking no more than 7 questions “Is your number the same, smaller than or equal to x?” where x is to be determined. The trick is to a …

Member Avatar for MrNoob
0
127
Member Avatar for MrNoob

hey i was reading some stuff about windows i was wondering if file is loaded at virtual memory and let's say we load many files at once wouldn't that cause thrashing ? or exucatables are loaded into RAM then copied to virtual memory of hdd ?

Member Avatar for MrNoob
0
158
Member Avatar for dragonbone

HI , I am a student in an university... I am assigned a project about the knight's tour on the chess , but must use the Warnsdorff's rule ... rule : Put a knight on the chess with any square , and find all patchs of knight (knight pass each …

Member Avatar for neithan
-1
134
Member Avatar for sima786

i wanted a c program for aztec ecg data compression technique....plz i require it in 1 day...

Member Avatar for SecurExpert
-2
95
Member Avatar for largedimples

Will someone please check this and tell me if I did this problem correctly. The question is presented bold; I also need help with push. I couldn't figure out how to complete the definition or routine for it. I am not very good at big o notation to determine if …

Member Avatar for Tom Gunn
0
784
Member Avatar for Dazaa

Hi, I am writing a reverse function, to reverse a string, but when I am compiling I am getting an error, and I know its from the malloc line of code. This is the first time i have used malloc, but I want the function to work for any length …

Member Avatar for Dave Sinkula
0
148
Member Avatar for Kandeep

Hi! how do you get this output? Income for the current pay period : -24 **Value must be greater than 0.0 **Try again. : 24.. **Trailing character encountered **Try again. : 24 When it gets a value higher than 0 it ends the program i typed the few codes for …

Member Avatar for Dave Sinkula
-1
84
Member Avatar for cfuilip

our lecturer want us to find a topic which we need to present next week... the program must include file handling... any idea for the topic ... and kindly show the example

Member Avatar for Shillz
0
82
Member Avatar for uttara

Hi frnds, May I have the code of the below program. The program to get the source code as output.

Member Avatar for csurfer
0
73
Member Avatar for StaticX

Hi, I am trying to write a simple program that stores a user input in a c-string,and will then print out each character (I)diaganolly across screen and (II) each character on a new line. The problem im having with this,and with c strings entirely,is that it keeps printing out random …

Member Avatar for StaticX
0
113
Member Avatar for tux4life

A small function which reverses a c-string by just swapping the elements :) ... Usage:: [CODE=C++] char[] str = "hello"; reverse(str); // str now contains "olleh" [/CODE]

Member Avatar for Nick Evan
0
1K
Member Avatar for arasucute

give me the perfect program like that output.[code]#include<stdio.h> #include<conio.h> void main() { int i,j; int a=15; int b=30; clrscr(); for(i=0;i<=a;i++) { for(j=0;j<=b;j++) { if(i==0||i==2||i==a) { if(i==0||i==2) if(j==0||j==b-4||j==b) printf("+"); else printf("-"); if(i==a) if(j==0||j==b) printf("+"); else printf("-"); { if(i==1||j==14) printf("mywindow"); if(i==1||j==28) printf("X"); } } if(j==0) if(i==1||i==3||i==4||i==5||i==6||i==7||i==8||i==9||i==10||i==11||i==12||i==13||i==14) printf("|"); else printf(" "); if(j==b) if(i==1||i==3||i==4||i==5||i==6||i==7||i==8||i==9||i==10||i==11||i==12||i==13||i==14) …

Member Avatar for yellowSnow
0
100
Member Avatar for pauloselhombre

Hey there folks. I'm in the middle of learning C# using the book 'C# and Game programming: A Beginner's Guide' by Salvatore A Buono and I've come to a bit of a problem. The example code for nested if and else-if statements does not work as intended. I could move …

Member Avatar for pauloselhombre
0
133
Member Avatar for hangulagerson

1. Write a program to implement a static circular queue. It should include the following functions: i) Enqueue – To add an element to the end of the queue [4] ii) Dequeue – To remove an element from the front of the queue [4] iii) IsEmpty – To check whether …

Member Avatar for yellowSnow
0
115
Member Avatar for chescarleta18

#include<stdio.h> #include<string.h> main() { char STR1[100]; int i; clrscr(); printf("Please input a STRING.\n"); gets (STR1); printf("\n%s is displayed in reverse form as:\n",STR1); for(i=strlen(STR1)-1; i>=0 ; i--) { printf("%c",STR1[i]); } getch(); }

Member Avatar for chescarleta18
0
190
Member Avatar for richkid

Hey guys, I have just written C program that calculates the force of a body using F = ma but there is some sort of problem occuring , could you please help me fix the error.

Member Avatar for chescarleta18
0
101
Member Avatar for AnkhUNC

So I've got an assignment for class. The point is to read in characters to a string. If there are 7, print the 7. If there are 10, print the 10. Less than or more than, print an error. It is also supposed to convert keyboard characters into their associated …

Member Avatar for AnkhUNC
0
95
Member Avatar for banders7

Displays which partitions are on which physical hard drives and shows partition starting offset and length. Developed and tested under XP using a Borland C++ compiler. Code is not provided for the private includes, but changes to make to code work are trival. References to werrtxt() and format() can be …

0
508
Member Avatar for Navera Karim

How can I Write a C language routine that defines a function mult(). The function mult() is supposed to perform scalar multiplication on the two vectors ‘a’ and ‘b’, and returns the vector ‘c’, such that c=a.b. Also, it pads zeros ‘0’ to the smaller of the two input vectors …

Member Avatar for yellowSnow
0
84
Member Avatar for vandna

hey i tried to make a program to find an item in an integer array using binary search technique n by iteration with the help of functions...but i am getting errors....so plz help me out..

Member Avatar for Grn Xtrm
-2
132
Member Avatar for PyroPaul2

This code works fine and can be called numerous times without any problems. However, if the bitmap is resized (made bigger), I get an access violation. This is not the case if the bimap is made smaller. I can confirm that the BMPSize & BitmapBytes array size tally at all …

Member Avatar for DdoubleD
-1
550
Member Avatar for needhelpe

how can I make a program that inputs the month and year. and then should output the days of the month. -january, march, may, july, august, october, and dicember have 31 days. -april, june, september, and november have 30 days. -february has 28 days in non-leap years and 29 in …

Member Avatar for OSiRiSsk
0
167
Member Avatar for indyasbest
Member Avatar for SecurExpert

I wish to write a program that works in the background, i.e. without showing any windows. Someone prescribed i try this: <code> #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { while(1) { Sleep(1000); } return 0; } <code> but its not working. it still shows …

Member Avatar for SecurExpert
0
128
Member Avatar for asmahaque_456

How will i convert this binary code"10110111" into decimal value? I have used the following codes [code=c] #include <stdio.h> main() { int n,track,sum,num; printf("number: "); scanf("%d%d%d%d%d%d%d%d%d%d%d", &n1, &n2, &n3, &n4, &n5, &n6, &n7, &n8, &n9, &n10, &n11); { sum=0; num='n1'*2+'n1'; sum=sum+num; } }[/code]

Member Avatar for WaltP
-2
112
Member Avatar for speedy94519

Hello you guys. Im writing a program that calculates 4 parameters: velocity, acceleration, distance, time. Part of my program is to implement an output that adds all the times and prints it into min and seconds and the type that im working with is float. The problem that im having …

Member Avatar for yellowSnow
0
88
Member Avatar for kotiloli

ı have a hw about multiplying [COLOR="Red"] very large[/COLOR] numbers.For example we can't use standart data types for multiplying two numbers which have twenty digits two each.So the doctor wants me to achieve that by[COLOR="Red"] Link List.[/COLOR] i'm responsible that holding these large numbers (multiplicand,multiplier and result) in link list.And …

Member Avatar for yellowSnow
0
120
Member Avatar for newcpp

I have a question: [CODE]#include <stdio.h> char * chstrswithf(char * a) { while(*a!='\0') { if(*a=='s') *a='f'; a++; } return a; } int main(void) { char string[]="this is a string"; chstrswithf(string); printf("%s \n",string); return 0; }[/CODE] the code above is ok for running. but when I replace the [COLOR="Red"]char string[]="this is …

Member Avatar for gerard4143
0
86
Member Avatar for cmsc

I have this linked list. I am sorting the names of the contacts. The head and middle insert part are already working, but when I need to insert in the tail part, the program won't continue, I don't know why. Please Help. Thanks! here's the code : [CODE] #include<stdio.h> typedef …

0
71
Member Avatar for MichaelSammels

Yeah, I'm stumped on this one: I need to get user input from a keyboard, with some problems involved: [LIST=1] [*]I'm using an OS I created [*]I do not have access to any standard includes [*]I need to code the function myself [*]I'm in protected mode [/LIST] Any help would …

Member Avatar for MichaelSammels
0
102
Member Avatar for SFletch

I've written a small web db app, designed to sit within another page (in an iframe). It is designed to be called with a parameter (or two). iframe html calls Default.aspx?Parameter=4 The default page does nothing except check for the existance of the parameter and store it a session state …

Member Avatar for kvprajapati
0
135
Member Avatar for nirveshverma
Member Avatar for M1cH

Hai2... everyone... who's in this forum... I'm Michael from Indonesia... I want to ask... How to Call Microsoft Visual C 6.0 Object file from Borland Delphi 7.0?? Please Response... Thank You. SNIP

0
45
Member Avatar for nagaa

The End.