15,550 Topics

Member Avatar for
Member Avatar for himanjim

[CODE]#include<stdio.h> char *str="char*str=%c%c%c;main(){printf(str,34,str,34);}"; void main() { printf(str,34,str,34); }[/CODE] gives the O/P [CODE] char *str="char*str=%c%c%c;main(){printf(str,34,str,34);}"; [/CODE] Can't say how?? No formatting string is used in printf() like %s or so.

Member Avatar for Ancient Dragon
0
241
Member Avatar for DotNetUser

In my Form_Load, I dynamically create buttons to populate a tabcontrol with 6 tabpages. For some reason, it doesn't like it when I make the buttons invisible in Form_Load. I'm wondering if there's an event that gets triggered after Form_Load so I can make the buttons invisible there. For now …

Member Avatar for GloriousEremite
0
92
Member Avatar for hay_man

Hi, Hope you can help. The following is essentially a small problem of an overall project, i have been trying to work out how to divide an inputted string, into say blocks of 4 characters and then output these separate blocks on the screen. e.g. 1234567891234567 ----> 1234 5678 9123 …

Member Avatar for Ancient Dragon
0
229
Member Avatar for l-o-s-t

Hello ... I've been trying to convert a long string of numbers into a number that can be used in calculations ( int, long, or long long ) ... but nothing worked :-| If I have a string of 1s and 0s, and this string could be up to 128 …

Member Avatar for Grunt
0
121
Member Avatar for grunge man

ok im getting angry because if i wana keep asking questions then i was told to get a book and read it but thats the problem the reason why i came to this website is besause i foud it verry usefull amd i cant bye a book and eaven if …

Member Avatar for Bench
0
286
Member Avatar for himanjim

FILE *ptr; char i; ptr=fopen("file.c","r"); while((i=fgetc(ptr))!=Null) printf("%c",i); leads to infinite loop??? but while(fgets(str,80,ptr)!=NULL) puts(str); on the similiar terms doesn't???

Member Avatar for Salem
0
164
Member Avatar for comp_sci11

[code] #include<alloc.h> #include<stdio.h> #include<string.h> #include<conio.h> #include<dos.h> #include<ctype.h> typedef struct node { int dd,mm,yy; int cus_ac_no[15]; char cus_name[25],cus_add[45],cus_ph_no[17]; double cus_bal; float cus_intrst; struct node *next; }node; node *L,*ptr; void add() { node *p,*q,*new; p=q=L; clrscr(); new=(node*)malloc(sizeof(node)); if(new==NULL) { printf("list is full"); getch(); return; } else { printf(" Enter customer account number …

Member Avatar for Salem
0
280
Member Avatar for s s paul

[quote] Friends I am making a program to seach a string from a input line of strings.There are two problems : (i)The program is giving correct search for word that is the 1st word of input line. e.g.,"hello" in hello friends how are you? but unsuccessful search for any word …

Member Avatar for Dave Sinkula
0
152
Member Avatar for DotNetUser

I need to modify the Form's Clientsize in a static function but I get a compiler error - error C2597: illegal reference to non-static member 'System::Windows::Forms::Form::ClientSize. Are there any workarounds? Thanks.

Member Avatar for DotNetUser
0
95
Member Avatar for himanjim

sizeof(3.14) GIVES 8 AS THE OUTPUT. Where sizeof(3.0f) gives 4 as output. Is it because default datatype alloted to 3.14 is double and attaching f changes it to float??

Member Avatar for Rashakil Fol
0
98
Member Avatar for sdybc

SO i got this program date_struct.c going and it looks like everything works except the printout part. When input 2 dates to get the numbers of days between them nothing happens, the program ends. This also happens when i try inputting a date and an integer, and returns a new …

Member Avatar for WaltP
0
126
Member Avatar for rafaelly2003

How can I install VS200 or 2005-Express on Compact flash (4GB) if it is a System disk?

Member Avatar for Ancient Dragon
0
34
Member Avatar for squirrel

Hi All, I have a program which takes a file as an input and does some processing depending upon the type of file passed. The file types are : abc_txt, abc_ply, abc_cnvinf, abc_laneinfo etc eg: DoWork [FileType] [File] ./DoWork txt abc_txt (or) ./DoWork cnvinf abc_cnvinf Now I have to perform …

Member Avatar for andor
0
105
Member Avatar for jazzz

Hi, I need to read all the records in a file till the end and print it to an outputfile. So I used feof() - while(feof(fp_infile) !=0) { fread(xxxx); fread(xxxx); fprintf(fp_outfile, XXXXX); } But this is not giving me any output i.e, the output file is empty. Can anyone help??? …

Member Avatar for Ancient Dragon
0
100
Member Avatar for Panda123

Hello Im trying to segment a file. In doing so I need to open/createnew smaller files. The code I have [ initial.open("c:/test.jpg", ios::in|ios::binary); // input output.open("c:/copy.jpg", ios::out|ios::binary); // output] only creates one file output. I would like to have a for loop which creates n file eg text1, text 2, …

Member Avatar for Micko
0
91
Member Avatar for sgriffiths

Hello All A question i have. I have a file which contains 5 million records. One line of this file may look something like below Adrian Tompson & Sons Ltd. If the last word in each line is Ltd, i need to change it to Limited, but i am truly …

Member Avatar for Micko
0
155
Member Avatar for gege1

How to write this program and using while, for or do..while only. Given a special squence of number as follows. 1,2,3,5,8,13,21,34.... the first two numbers must be 1 and 2. The following subsequent numbers are the sum of their two producessors.Write a program in C that needs a value n …

Member Avatar for Salem
0
108
Member Avatar for dannyfang

Hi, I'm a freshman in computer science and a new member to this forum. I'd like to convert the string representation of a number e.g "456" into its integer equivalent i.e. 456. As for character representation of single digits e.g. "6", I'm able to convert it to its integer equivalent …

Member Avatar for Dave Sinkula
0
330
Member Avatar for sdybc

[COLOR=#000000]Completely confused on how to do this:[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000] (a) Write function "daysbetween" which takes two dates and returns the number of days in between them. [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000](b) write the function "adddays" which takes a date and an integer, and returns a new date which is the …

Member Avatar for WaltP
0
106
Member Avatar for himanjim

the function void fun() { char c; if(c=getchar())!='\n') fun(); printf("%c",c); } Gives the output cba .Can't say why?

Member Avatar for ~s.o.s~
0
161
Member Avatar for Mr B

[COLOR=#000000]Hi [/COLOR] [COLOR=#000000] World[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]From a new member: it’s taken me a lifetime to venture into the Internet world or should I say to register with a wedsite, I guess you have to start some time so here goes. [/COLOR] [COLOR=#000000]Can anyone help with a problem my computer …

Member Avatar for Ancient Dragon
0
193
Member Avatar for Cyrus_DB

We often hear this statement: "C is a general-purpose programming language." What exactly do u mean by the term: 'GENERAL-PURPOSE' in the present context of computer language?

Member Avatar for Grunt
0
87
Member Avatar for cezarjont

can you please help me or give some advice of how will i make this problem: Student database: the user will be asked to input information about students(1-20 students) and the inputs are age,year level,name,course.... the program also will be able to sort the informations ethier by descending or ascending …

Member Avatar for cezarjont
0
925
Member Avatar for himanjim

:?:The statement *s1++=*s2++ actually leads to the assignment of value at s2 to s1 followed by incrementation of s2 then the incrementation of s1.

Member Avatar for ~s.o.s~
0
238
Member Avatar for rxgmoral

About CView problem,thank:) <<<<<<<<<Preview.H>>>>>>> class Preview : public CView { public: virtual void OnDraw(CDC* pDC); virtual BOOL OnPreparePrinting(CPrintInfo *pInfo); void OnPrint(CDC *pDC, CPrintInfo* pInfo); }; <<<<<<Preview.CPP>>>>>>>>> void Preview::OnDraw(CDC* /*pDC*/) { } BOOL Preview::OnPreparePrinting(CPrintInfo* pInfo) { return DoPreparePrinting(pInfo); } void Preview::OnPrint(CDC *pDC, CPrintInfo* pInfo) { CString str=_T("rrr"); pDC->TextOut(0,30,str); } <<<<<<<<<<<Dialog.Cpp>>>>>>>> Preview …

Member Avatar for Ancient Dragon
0
105
Member Avatar for puuukeey

[B]Introduction[/B] hey all, I'm matt. I'm new to this forum and C. I hope to stick around and eventually be able to ANSWER questions instead of sit around being new to this. but for now, new to this is what I am. [B]My Background[/B] I've been learning from Dave Mark's …

Member Avatar for Dave Sinkula
0
151
Member Avatar for anu_dinoo

hey guys.. i need this urgently.. please help me in this. i need a code for detecting usb devices. a complete code, wanna make a project on this!

Member Avatar for Salem
0
41
Member Avatar for jazzz

Hi, I have to write a Dump Tool for a file on UNIX. I have never written a dump tool before. Can anyone please guide me how to proceed?? jazz

Member Avatar for jazzz
0
251
Member Avatar for inazdaud

hi all.. can anyone give me the algorithm for simple and deficit round robin.. pls.... :-| i'm doing a research on transferring video over bluetooth..

Member Avatar for Grunt
0
66
Member Avatar for sgriffiths

Hi I have a struct [code] struct s_list { char name[30]; char lowest[30]; int int_value; }LIST[100]; [/code] I want to pass the int_value to a the unix function qsort, but how do i pass structs to a function/procedure? regards

Member Avatar for ~s.o.s~
0
689

The End.