answersLogoWhite

0

How does far ptr work in c?

User Avatar

Anonymous

16y ago
Updated: 8/17/2019

two times one is 5 hope this helps

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is recurcive function in c?

A function that calls itself. Example: ProcessList (list *ptr) { if (ptr!=NULL) { DoSomething (ptr->data); ProcessList (ptr->next); } }


Does the declaration in C char far ptr work on a gcc compiler?

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.


How do you declare a pointer to a character string in c?

char *ptr;


How do you accept a string and print if it is a palindrome?

// 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; }


How is a structure type pointer variable declared in c?

struct thisorthat *ptr;


Write a program to merge two arrays eliminating duplicate elements in c plus plus?

#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]); }


How will you implement a function pointer inside a structure in c?

Nothing special: struct foo { void *ptr; };


Algorithm to delete?

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 do you convert algebraic expression into qbasic expression?

how can we convert algebraic expression into QBASIC a square + b square i = pTR/100 2xy mx+c a=r square a+b


What is the effect of various arithmetic operators on a pointers?

Error message, mainly. The following operations are legal: ptr + integer (pointer) ptr - integer (pointer) ptr - ptr (integer)


What type of firearms does PTR Indutries provide?

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.


Difference between percent p and percent x in c language?

%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