What is a far pointer in c?
Answer / Ranjeet Kumar Ranjan
"Far pointers are used in 16-bit DOS environment for addressing memory beyond the segmented memory model. They are not applicable in modern C programming as it is rarely used today."
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
what is the diference between pointer to the function and function to the pointer?
Can you please explain the scope of static variables?
WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?
28 Answers 3D PLM, Code Studio, Deltech, IBM,
if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND CORRESPONDING VALUE FROM ASCII TABLE
How do you search data in a data file using random access method?
#include<stdio.h> main() { int a=1; int b=0; b=++a + ++a; printf("%d %d",a,b); }
Explain enumerated types.
Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }
I use turbo C which allocates 2 bytes for integers and 4 bytes for long. I tried to declare array of size 500000 of long type using the following code... long *arr; arr=(long *)(malloc)(500000 * sizeof(long)); It gives a warning that "Conversion may lose significant digits in function main"... And the resulting array size was very less around 8400 as compared to 500000. Any suggestions will be welcomed....
write a c program to print a given number as odd or even without using loop statements,(no if ,while etc)
Can you think of a way when a program crashed before reaching main? If yes how?