- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 15
- Posts with Upvotes
- 13
- Upvoting Members
- 8
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
I can not solve this problem. I should write a code for PROGRAM in C, which finds the longest word of the text enter by the keyboard. Plaese help me! |
|
Re:
[CODE] /* Any year is input through the keyboard. write a program to determine whether the year is a leap year or not. */ #include <stdio.h> #include <conio.h> void main(void) { int year; clrscr(); printf("\n\n enter a year::"); scanf("%d",&year); if(year%400==0) printf("\n\n Leap Year."); else if(year%100==0) printf("\n\n Not Leap Year."); else … |
|
Re:
1)w.a.p. in c language that accepts a file as input and prints the no. of words in it. 2)w.a.p. in c language that accepts a file as input and converts all alphabetic characters in it to upper case. 3)w.a.p. in c that accepts a string and prints the list of … |
|
Re:
Hi the aim of my program is to allow a user to enter the size of an array and then allows the user to enter the values into an array. The bit im having a problem with is I want to count how many odd and even numbers there are … |
|
Re:
Why is this not working [CODE]//Character Manipulation #include <stdio.h> int main() { int x; //for loops int counter=0; //for input char character; char sentence[20]; printf("Press 1 to use getchar \n Press 2 to use gets \n Press 3 to use sscan \n "); scanf("%d",&x); switch(x) { case 1: printf("Enter something"); … |
|
Re:
Wondering if someone could guide me in the right direction. I think this code is right but can't figure out why my switch loop won't access my char array of grades and add it to an int array. [code] #include <stdio.h> int main (void) { char grade[32] = { 'A', … |
|
Re:
Hello Can anyone tell me the way to reverse a string in C and only in """"C"""? How to get a string through one by one characters of the same? And if I use the following I get errors String name="hai"; len=strlen(name); for(i=0;i<len;i++) { scanf("%c",name[i]); } how to get name … |
|
Re:
Hello there, I've just started on C and what I'm trying to do is copying one string to another (which has not been initialized before) without using any string.h functions. Here's my code. [CODE] #include <stdio.h> #include <stdlib.h> void copyString(char*,char**); int main(){ char* string1="Hello there"; char** string2; printf("string1: %s\n",string1); printf("Copying … |
|
Re:
[CODE]#include<stdio.h> void string_copy(char str1[],char str2[]); int main() { int i; char str1[10],str2[10]; printf("please enter a name(string 1):"); gets(str1); printf("please enter a name(string 2):"); gets(str2); string_copy(str1,str2); printf("string 2 copied to string 1"); for(i=0;i<10;i++) { printf("%c",str1[i]); } return 0; } void string_copy(char *p1,char *p2) { int i; while((*p2)!='\0') { for(i=0;i<10;i++) { *(p1)=*(p2); … |
|
Re:
Hi i'm in a university class, and i'm working on a little assignment that is supposed to have an int array and have assorted functions to do things to the array currently i have two of the four functions working and i'm having trouble with the function that is supposed … |
|
Re:
i am new to programming............i just want to create a linked list program plz check for error for me [code] #include<stdio.h> #include<conio.h> #include<malloc.h> void insertAtEnd(int no); void insertAtBegin(int no); void insertAtPos(int no,int pos); template <span= id="IL_AD" class="IL_AD">Display</span>(); <span id="IL_AD5" class="IL_AD">struct</span> LinkedList { int num; struct LinkedList *next; }; typedef struct … |
|
Re:
hi how are you ? i have project in loop but i dont know how to solve it ? Write a C program to read results of class of 20 students. Each student has 4 results, distributed as follow: • Test 1 25 % • Test 2 25 % • … |
|
Re:
hello, can any 1 please help/guide me for creating an program .exe file in C. as i am using Dev c++ compiler.say for E.g( program of addition in this by compiling & running it i get the required output. but if i dont want to run the program again n … |
|
Re:
Hello )) please tell me - where's the bug in this code - [ICODE] main() { short int n = 0; n=[U]getdet[/U] ( **m , n); } [B]short int ** [U]getdet[/U] (short int **m , int n) /*вычисляем определитель матрицы*/ { short int c=0; if (n==1) return **m; }[/B][/ICODE] compiler … |
|
Re:
Hi, I need to open a file containing string values one below the other and display them. I'm able to open the file but there is some error while displaying them. Below is my code, kindly guide me to my mistake. [code=c] FILE *fp; char airfoil[6]; fp=fopen("/cygdrive/d/airfoil.txt","r"); if(fp!=NULL) { while … |
|
Re:
[CODE]#include<stdio.h> void main() { int i=1,j=1,n=9; printf("enter the char"); scanf("%d",&n); while(i<=n) { while(j<=i) { printf("%d/0",i); j++; } printf("/n"); i++; } }[/CODE] OUTPUT 1 22 333 4444 55555 |
|
Re:
I need to write a code that receive from the user numbers (must use with EOF) and store them into a matrix. There are some more requirements: 1. Matrix must be only N*N size, while N will be defined at top. 2. If user is trying to enter more than … |
|
Re:
#include "Stdio.h" [CODE]main() { int a,b,c; int count = 1; for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\ TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\ NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\ HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\ T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\ Hq!WFs XDt!" [b+++21]; ) for(; a-- > 64 ; ) putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0; … |
|
Re:
I have the following code for Quick Sort procedure: [CODE] #include<stdio.h> void Quick_sort(int *arr,int left,int right); int Partition(int *arr,int left,int right,int pivotindex); int main() { int a[20],n,ctr=0,j=0; printf("\nEnter number of elements:"); scanf("%d",&n); printf("Enter array elements:"); while(ctr<n) { scanf("%d ",&a[ctr]); ctr++; } Quick_sort(a,0,n-1); printf("\nSorted Array:"); while(j<n) { printf("%d ",a[j]); j++; } … |
|
Re:
Hellooo guys could any one help me pllz i have a final exam tmw :( and the exam is Write a program that read 5 integers numbers and print the largest and smallest numbers By using IF statements :( |
|
I am using CODEBLOCKS and I am creating a program that performs basic operations like add, delete and insert on Doubly LinkList , My Program is working fine on older Turboc compilers. But when i run it on codeblock its causing problem when i try to delete a node. [CODE] … |
|
Re:
How to write a program that asks the users to enter two integers, obtains the numbers from user, then prints the larger number followed by the words "is larger", if the numbers are equal, print the message "these are equal". use only the single-selection form of the if statement. |
|
Re:
[code] #include<stdio.h> #include<conio.h> void main(void) { int a1,a2,a3,a4,a5; clrscr(); scanf("%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5); printf("%d%d%d%d%d",a5,a4,a3,a2,a1); getch(); } [/code] |
|
The Program is Addition of Large Integers.. Although This program is working But I want to know where i went wrong or what should i need to do to make it better.. [CODE] # include <stdio.h> # include <stdlib.h> # include <ctype.h> # include <string.h> typedef struct poly { int … |
|
Re:
I dont know what to do ADDING ELEMENT.first selection in the main menu....pls help me... A cluster is defined as a collection of different elements. A and B, including two sets of integer elements that are required for a program to perform certain procedures on the sets. To do this, … |
|
Re:
Hi All, I want a C programme which will take a user input as a date and number of days, and then it will add the given number of days to the input date and will give the resulted date. It should keep in mind all the permutation and combinations … |
|
Let P1 and P2 are two polynominals.. where p1 = 1 + 4X^2 + x^4 and p2 = 2x^2 + x^4 program is to multiply p1 with p2 p3 = p1 * p2 Like line 1: ( 1 + 4x^2 + x^4) (2x^2 + x^4) line 2: 1*(2x^2 + x^4) … |
|
Re:
I want to know the procedure by which we can calculate time complexity of a C program. and how would we compare two algorithms. here are two sorting programs. how to compare both. [CODE] for(i = 0; i < n - 1; i++) for(j = i + 1; j < … |
|
Re:
I'm trying to write a program that can win a Battleship game in fewer than 60 guesses. Since the Battleship game that I am writing this for uses a 10x10 array, I thought that first of all I would just try to win the game in 100 guesses before I … |
|
Re:
Hi I need to have an array in my program that is defined by the user. I just need the user to enter the size of the array and then enter the integer values that they want to store in the array. I know how to declare the array myself, … |