two times one is 5 hope this helps
A function that calls itself. Example: ProcessList (list *ptr) { if (ptr!=NULL) { DoSomething (ptr->data); ProcessList (ptr->next); } }
The far keyword is not accepted by gcc compiler and hence it will show the error. 'far' allows you to access a physical memory address directly which is not allowed in modern operating systems like windows or gnu/linux. I think far works on DJGPP - a dos compiler.
char *ptr;
// Return true if str is a palindrome bool is_palindrome (char* str) { int len; char* cpy; char* ptr; bool b; len = strlen (str); if (!len) return false; cpy = malloc (sizeof(char) * (len + 1)); ptr = cpy; while (*ptr=*str) { if (*ptr>='A' *ptr<='Z') *ptr+=('a'-'A'); if ((*ptr>='a' && *ptr<='z') (*ptr>='0' && *ptr<='9')) { ++ptr; } ++str; } *ptr = '\0'; --ptr; str = cpy; while ((cpy!=ptr) && (cpy!=(ptr+1)) && (*cpy==*ptr)) { ++cpy; --ptr; } b = (*cpy==*ptr); free (str); return b; }
struct thisorthat *ptr;
#include<stdio.h> main() { int *ptr; int i,j,k=0,n,temp,n1,n2,c[20]; printf("\nEnter then no. os elememt of 1st array :"); scanf("%d",&n1); printf("\nEnter the element :\n"); ptr=(int *)malloc(n1* sizeof(int)); for(i=0;i<n1;i++,k++) { scanf("%d",ptr+i ); c[k]=*(ptr+i); } printf("\nEnter then no. os elememt of 2st array :"); scanf("%d",&n2); printf("\nEnter the element :\n"); ptr=(int *)malloc(n2* sizeof(int)); for(j=0;j<n2;j++,k++) { scanf("%d",ptr+j ); c[k]=*(ptr+j); } for(i=0;i<n1+n2;i++) { for(j=0;j<n1+n2;j++) { if(c[i]<c[j]) { temp=c[i]; c[i]=c[j]; c[j]=temp; } } } printf("\nAfter combined and sorted both array : \n"); for(i=0;i<n1+n2;i++) printf("Element [%d] = %d\n",i+1,c[i]); }
Nothing special: struct foo { void *ptr; };
The only way to delete objects in an object oriented programming language (unless they were created in heap memory) is for the object to go out of scope. If the object is declared in the heap, in c++ you would use delete[] ptr; or delete ptr; where ptr is a pointer to your object.
how can we convert algebraic expression into QBASIC a square + b square i = pTR/100 2xy mx+c a=r square a+b
Error message, mainly. The following operations are legal: ptr + integer (pointer) ptr - integer (pointer) ptr - ptr (integer)
PTR Industries manufactures machine gun rifles for law-enforcement, military, and even regular civilians. Some of their models include the PTR Classic Wood, the PTR MSG91C, and the PTR SFR.
%p prints a pointer, %x prints an integer. They may be similar, but not the same. Eg.printf ("ptr=%p int=%d\n", main, (int)main);DOS: ptr=0F01:0010 int=10Windows: ptr=:0F010010 int=F010010