15,551 Topics
| |
I'm trying to write a program to reverse a string, letter by letter. This was my latest attempt: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char oldMsg[100], newMsg[100]; int cd = 12, cu = 0; strcpy(newMsg, "Hello World!"); while (cd > 0) { newMsg[cu] = oldMsg[cd]; cu++; … | |
can someone give me of a list of escape sequences in C..... i would like to know all of them if possible..... thanks in advance... | |
If its bad to use system("PAUSE");, then is it bad to use any system commands? Such as system("title x"); or system("color 4f");? If it is, is there another way to title the program? | |
Hey, I was doing some coding for fun, just practicing and seeing if i could still all the sorts and searches. My question is unrelated to that however because i can't seem to figure out an easy way to generate random char arrays. i found a random() function in the … | |
Hi All, Please expain me, in below giving statements which one is efficient. int i=0; i = i + 1; or i++; 2. In We Allocate the memory using malloc. between somewhere after allocating memory if our programming crashed.Then Allocated memory will be immedately freed by OS or OS will … | |
Hey, Some one Please help in Completing this code of CRC [code=c] char* substr(char* pra,int strt,int end)//To Evaluate Substring { char pr[5]="\0"; int j,k; for(j=strt,k=0;j<=end&&k<5;j++,k++) pr[k]=pra[j]; return pr; } char* exor(char* pra,char* div)//To Evaluate Mod2 Operation { char out[5]="\0"; int i; for(i=0;i<strlen(pra);i++) { if(pra[i]==div[i]) out[i]='0'; else out[i]='1'; } return out; … | |
hi all, i jus executed this code on the borland compiler #include<stdio.h> void main() { char a[20],s[22]; scanf("%s", a); gets(s); } And it only took input from scanf function only whereas when i tried this code #include<stdio.h> void main() { char a[20],s[22]; gets(s); scanf("%s",a); } it took input from both … | |
In C the variables are often declared using keywords like auto, extern, static, const etc..... i just want to know what is the function of each.... where are they used and a system level interpretation i.e. how the system interprets these variables.... can somebody help.... | |
Deal all,my prob:how can i pass data in a file after reading the file in C. i want to encrypt data of this file after reading the file.i know i cn use f commands to read data but want to pass the data later in second part of my program.sorry … | |
please help me in writing the code for "polynomial ADT ADDITION using [B]LINKED LIST[/B]:S | |
I am a beginner in computers, i would like to be assisted in writing a simple program that inputs a fraction in the form of a/b and c/d and culculates the sum and returns the answer in the simlest form as in p/q. Notes do not allow zero as the … | |
hi I want to know what is linker and linkage in c language. Could some one explain me what is linker and linkage. Narendhar | |
Hi, Does anyone know anything about stack size reduction? I`ve gone thru the C forum and I did not find anything. Wat r the standard techniques to reduce the stack size? From wat I`ve heard, one of the best ways is to try and avoid static arrays in functions. Is … | |
I want to know how to write a program to print all ascii values and equivalent characters using a while loop. ascii values vary from 0 to 255. | |
including the 2 conditions that r chekd for prime numberS | |
how to find out the maximum and the second maximum number from an array of integers | |
i posted a thread earlier and from the links given to me there i found that scanf(), gets() and some functions in C cause a lot of problem when an erroneous input is given.... 1. i want to know how these problems are avoided while programming 2. if these functions … | |
Hai Guys This Is Praneeth Kumar Can U please give me a Code 4 CRC -12,CRC-16,CRC-CCITT in C | |
Hi, i am new to this forum, and new to c programming. I have an assignment to write a program in c which asks the user to type in a file name (already existing) for which he wants to do processing. The size of the file is not known so … | |
I have two static libraries: [INDENT][COLOR="Green"]/usr/X11R6/lib/libX11.a[/COLOR] - Standard library, ~ 1.5MB [COLOR="Green"]./libxbgi.a[/COLOR] - Created by me, ~60KB[/INDENT] Now I use the following commands to compile a program, [I]test.c[/I]: [inlinecode]$gcc -o test test.c -lm -L /usr/X11R6/lib -lX11 -L . -lxbgi[/inlinecode] This works fine, the executable [I]test[/I] is 33KB, which is as … | |
Dear programmers, I am a new learner of C. I want to know the format specifier for long long int. I am using .net 2003 for programming. I am trying "%lld", but its not giving right results. Can any one help me with this. Thanking you ! Regards, Amar | |
Im doing "Sams Teach Yourself C in 24 Hours". Which can be found [URL="http://aelinik.free.fr/c/index.html"]here.[/URL] I'm at hour 6 right now. I most likely will run into several problems while trying to solve his excercises. I don't want to make a new thread everytime I run into a problem. So I … | |
- finiteness - absence of ambiguity - sequence definition - input, output - effectiveness - scope definition thanks! | |
hi to every one, I am working in AT91RM9200 microcontroller,I want to use interrupt functions in that microcontroller can someone suggest solutions, I am using C code. | |
can someone give me some example code to develop a multitasking program consists 3 lines. lines one produce A and B where line 2 receive A and line 3 receive B... im new in C , can someone show me a example for reference.. TQ | |
I have no idea why. The lines it's skipping is the system("PAUSE");. Not the first two but the last two. [code=c] #include <stdlib.h> #include <stdio.h> int main() { char Big, Small; Big='Z'; Small='z'; printf("Z=%d.\nz=%d.\n",Big,Small); system("PAUSE"); int X,Y; X=72; Y=104; printf("74=%c.\n104=%c.\n",X,Y); system("PAUSE"); double DblNum = 123.456; printf("f=%f.\nScientific=%e.\ntestF=%F.\n",DblNum,DblNum,DblNum); system("PAUSE"); char Newline = … | |
consider the structure [code]struct gun { char name[50]; int magazinesize; float calibre; };[/code] i found in the site [url]http://www.cs.cf.ac.uk/Dave/C/node9.html#SECTION00900000000000000000[/url] that the tag (i.e gun) of the structure is optional.... in that case wouldn't there be a problem when we declare a variable of type struct or if we have more … | |
when an array is received as a parameter by a function then whatever the dimensions of the array the first subscript is specified with empty braces i.e[ ] why is it so..... what is the implication of such a declaration [code] int sort(list[][a]) { /*statements*/ }[/code] | |
Hello Evrybody please can anyone help or explain to me how can i find time taken for a code to execute.I have put clock in main and its working.But now i have to find time outside main.The clock statement is not working i have added clock_t start = clock(); and … | |
Hi, Could anyone tell me, how to convert scancode to an equivalent ASCII char. in C language. Vijay. |
The End.