- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
life explorer
- Interests
- music,dance,reading,writin
Q.Write a function to concatenate to input strings into one large string and display the result. I know how to do this using strcat but not without it. Also can't use pointers. Please help!! |
|
I am kinda new to world of c programming, and i have been assigned a problem that is written as follows: Write a procedure that counts the number or words in a string. Write a program to test your new procedure. I am kinda lost on this completely. Any help … |
|
Q.Create an equivalent of four function calculator. The program should request the user to enter two numbers and an operator. It should carry out specified arithmetic operation on the two numbers( using switch case).After displaying the result, the program should ask the user if he/she wants to do another calculation.If … |
|
I read a lot from "Are teens bad at driving?" and it annoyed me that some people were mad for other people "getting off topic". It happens in every thread. Well, this is my thread and I say you can talk about whatever you want. Feel free, someone say something … |
|
I'm glad to see that our legal system is unbiased and will treat Paris Hilton just like anyone else, or at least that's what I thought until I heard that they have reduced her jail time by half. I heard that this was based on the over crowding of the … |
|
Q.Using recursive function,reverse a string. Solution I tried [CODE] #include<stdio.h> #include<string.h> char reverse(char *ptr,int length) { return ptr[0]=ptr[length-1]; while(*ptr!='\0') reverse(ptr+1,length-2); } int main(void) { char string[40],answer; printf("Enter string\n"); gets(string); answer=reverse(string,strlen(string)); printf("%c",answer); return 0; } [/CODE] It gives an error sayin 'Unreachable code in function reverse(char near*,int)' because of the line … |
|
I want to know when it is necessary to include a return statemnt in one's code and also what is the difference between recursion and iteration? |
|
if anybody wantt to help plz give me email that i can ask my problem with detail for solving |
|
Q.Write a program to input data in an array.Compute the sum and average.Then count the number of values greater than the average and lesser than the average.Print the average,sum and the two counts. Solution I tried [CODE] #include<stdio.h> int main(void) { int X[10],i,lesser=0,greater=0,sum=0; float avg=0; for(i=0;i<10;i++) { printf("Enter number\n"); scanf("%d",&X[i]); … |
|
Q. WAPC to read a string into an aaray and capitalize the first character of every word in the input. Solution I tried [CODE] #include<stdio.h> int main(void) { char string[50]; char *ptr; printf("Enter string\n"); fgets(string,sizeof string,stdin); printf("string= \"%s\"\n",string); for(ptr=string;string!='\0';ptr++) { if(*ptr==' ') { ptr++; *ptr=*ptr-32; } } printf("The new string … |
|
Q.Write a function to accept a main string, one search string and one replace string. Replace the first occurence of search string in main string by replace string{assume the length of search and replace string is same). Solution I tried [CODE] #include<stdio.h> #include<conio.h> void main() { char mai[80],search[40],replace[40]; int i,j,k,l; … |
|
Q.Write a function to accept 20 characters and display whether each character input is a digit, lower case letter or upper case letter. Solution I tried [code=c] #include<stdio.h> #include<conio.h> int main() { char inp; int i; clrscr(); for(i=0;i<20;i++) { printf("Enter a character\n"); scanf("%c",&inp); if(inp>='0'&& inp<='9') { printf("It is a digit\n"); … |
|
Q.Write a function to accept upto 25 numbers and display highest and lowest number along with all the numbers. Solution I tried [code=c] #include<stdio.h> #include<conio.h> void main() { int array[25],low,high; int i; clrscr(); do { printf("Enter a number(0 to terminate)\n"); scanf("%d",&array[i]); }while(array[i]!=0); i=0; low=high=array[0]; while(array[i]!=0) { if (low>array[i]) low=array[i]; else … |