what can i do ?? to solve it.......
can u explain ??
User Profile
Collapse
-
there is some thing goes wrong in this condition
Code:else if(p->data > q->data) { while(q!=NULL){ m=q->next; q->next=p; p->next=m; q=q->next; } }Leave a comment:
-
when i run the program the output is 3 9
it removes the first two numbers 4 & 5Leave a comment:
-
error in the sorting code it removes some output from the linked list
error in the sorting code it removes inputs in the linked list when the p->data > q->data
...Code:#include<stdio.h> struct node{ int data; node* next; }; node* insert (node*list, int x) {node *m=new(node); node*q=list; node*p=new(node); p->data=x; if(q==NULL) {p->next=list; list=p; return list;} else if(p->data -
-
Code:#include<stdio.h> typedef struct { char name[10]; int salary; }me; int main() { me a; a.name="ehab"; a.salary=5789; printf("%s\n",a.name); printf("%d",a.salary); return 0; }Leave a comment:
-
i move the typedef but there is no change
i can't understand what is the meaning of enclose code in CODE tagsLeave a comment:
-
Lvalue required in function main what can i do !!
Code:#include<stdio.h> int main() { typedef struct { char name[10]; int salary; }me; me a; a.name="ehab"; a.salary=5789; printf("%s",a.name); printf("%d",a.salary); return 0; } -
when i replace the space between the words by tab it didn't work in a right way
any help in this !!Leave a comment:
-
-
-
ehab mohamed started a topic in the printf the program remove all the strings after the space why???in Cin the printf the program remove all the strings after the space why???
try to inter programming language ...Code:#include<stdio.h> void num(char arr[100]) { int i=0, count=1; while (arr[i]!='\0') { if (arr[i]==' ') {count++;} i++; } printf("%d",count); } int main() { char data [100]; scanf("%s",&data); printf("%s",data); num(data); return 0; }Last edited by Dormilich; Dec 7 '10, 11:58 AM. Reason: please use [CODE] [/CODE] tags when posting code -
-
-
-
i can't understand you mr.newb16
i want in each time scanf for the flag to know if it complete in the loop or get outLeave a comment:
-
error in the scanf in the do-while loop
#include<stdio. h>
void main()
{
int i, n, month, day, calcday, calcmonth;
char flag='y';
char weekday[][10]={"Friday","Sat urday","Sunday" ,"Monday","Tues day","Wednesday ","Thursday "};
int usermonth[]={31,28,31,30,3 1,30,31,31,30,3 1,30,31};
do
{
printf("Enter the date (Day, Month): ");
scanf("%d... -
Lvalue required in function main
When i try to run this program it give me a message that Lvalue required in function main. What is the cause?...
No activity results to display
Show More
Leave a comment: