Can anyone tell me what is wrong with my code?
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
typedef struct Josephous
{
int pos;
struct Josephous *next;
Type: Posts; User: daggerhunt
Can anyone tell me what is wrong with my code?
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
typedef struct Josephous
{
int pos;
struct Josephous *next;
Suppose the 1st list is 3--2 5--2 2--0 and the second list is 9--2 4--1 3--0, then this code prints the output as follows :
27--4 9--2
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
typedef struct poly_node
{
int coeff;
int power;
struct poly_node *next;
}polynode;
polynode* create(polynode*,int);
Please help me out....someone!!!
I am quite sure the problem is only in the insert function. Please do post a reply as soon as possible.
This code is working for all other key values except the first node value or the "head". If I provide the head->number as the key value, the number entered is not inserted at the beginning. The code...
OK ..I am going to rethink my logic. Thanks for the help.
For array size 3, the output I got is this?
1 2 3
10 15 14
9 7 16
The program is giving a wrong output.And also this code does not work for matrix of all orders.I just want my code to corrected.
#include <stdio.h>
#include <conio.h>
int main()
{
int arr[100][100];
int i,j,n,c;
printf("Enter size of spiral matrix ");
scanf("%d",&n);
c=1;
for(i=0;i<n;i++)
Thank you...but I don't understand one thing , why using gets() makes my program vulnerable to hackers?
But its a futile effort.Its not working!!!
#include <stdio.h>
int main()
{
char arr[100];
int count =0;
int j,i,k;
char temp;
printf("enter the string\n");
gets(arr);
I need a program to sort the words of a string leixographically in C. For example : INPUT- how are you
OUTPUT: are how you