- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 19
- Posts with Downvotes
- 9
- Downvoting Members
- 8
17 Posted Topics
[CODE] int a[10]={3,45,6,78,89,334,4,77,54,60}; int *p=a; [/CODE] what will *p++ do ? as ++ has more priority than * therefore ++ will be executed fisrt ? but its postincrement so it will happen after change of line or statement. so will it increment the pointer or increment the value hold by …
[CODE]void main(); { inst set=0; char a[10]; char b[10]; for(i=0;i<10;i++) { for(j=10;j>0;j--) { if(a[i]==b[j]) { if(a[i]==a[10]) set=1; } else { break; } } if(set==1) printf("palindrome"); else { printf("not"); } }[/CODE]
# include<stdio.h> int main() { int a[10]; int max= retmax(a); printf("max="%d"",max); } int retmax(int a) { int i,j; for(i=0;i<10;i++) { for(j=i+1;j<10;j++) { if(a[i]>a[j]) {int temp; temp=a[i]; a[i]=a[j]; a[j]=temp; } } return a[10]; } } } }
[CODE]#include<stdio.h> #include<conio.h> int main() { int dec,rem,ans=0; printf("Enter the Decimal number\n"); scanf("%d",&dec); while(dec>=2) { rem=dec%2; dec=dec/2; if(rem==0) ans=ans*10; else ans=(ans*10)+1; } printf(" binary number is"); while(ans>0) { rem=ans%10; ans=ans/10; printf("%d",rem); } getch(); return 0; } [/CODE] this code is not working properly for example for 10 it gives 01, should …
try left or right join querry depending upon the priorities of tables !!
take a file pointer open file and [CODE] file* fp=fopen("FILENAME","r"); while(fp!=null) { if(fp=='D') { //replace it with whatever you want } fp++; } [/CODE]
get Byte Array from DB then convert it into image and save it into some folder on serverside then use the URL of that image to represent it eg:- imageSample.imageURL=~URLofYourImage; CODE:- [CODE] public void byteArrayToImage(byte[] byteArrayIn) { try { MemoryStream ms = new MemoryStream(byteArrayIn); System.Drawing.Image imgPhoto = System.Drawing.Image.FromStream(ms); imgPhoto.Save(Server.MapPath("temp.jpg")); imgEmployee.ImageUrl …
HIDE the key dont show it in gridview !! if your key is autogenerated then make it labelKEY.Visible=false;
int a; is Definition and Declaration both ? or declaration only ?
[CODE]void main() { int a; char b; scanf("%d%c",&a,&b); /// char not taken ?? } // problem with buffer or stack [/CODE] i know this can be avoid by using fflush(stdin); or giving "\n" or space inbetween ; i need exact answer plzz help !!! thanks
b is just refrence to a; a++; will reflect change in b ; but that doesnt mean they are havin same address !!! b is not a variable its just refrence !! &b will always give address of a !! becoz b is pointing to a;
[CODE]#include<stdio.h> int main() { int a,b; int c= max(a,b); printf("max value="%d",*c); } int max(int a,int b) { if(a>b) {return &a; } else {return &b; } } } }[/CODE]
[CODE]struct *p;//node pointing to start struct *q=p;//starting ptr; for(q->null) { for(i=0;i<4;i++)//move by 3 {*q++; } for(j=0;j<3;j++)//move by2 {*p++ } p->next=q->next; q=null; q->next=p; }[/CODE]
Differential equations of addition (DEA) are of the following form: (x+y)+((x+a)+(y+b))=c; where x and y are n-bit unknown variables and a, b and c are known variables. The symbols + and denote addition modulo 2n and bitwise exclusive-or respectively. The above equation is denoted by (a,b,c). Let a set S …
[CODE]#include<stdio.h> int main() { string a; a="sdfsdfsdfsdfsdfsdf"; int b= findlength(a); printf("length=%d",b); } int findlength(string a) { char * p=a; int cnt=0; if(*p!=null) {*p++; cnt++; } return cnt; }[/CODE]
[CODE]#include<stdio.h> int main() { int a[10]; sort(a); } void sort(int a[10]) { for(int i=0;i<10;i++) { for(j=i+1;j<10;j++) { if(a[i]<a[j]) { int temp; temp=a[i]; a[i]=a[j]; a[j]=temp; } } } }[/CODE]
The End.
sourabhtripathi