what are the interview question's in the language c
Answers were Sorted based on User's Feedback
Interview questions in C would be :
- what are pointers?
- what do the .h files mean?
my fav ques - which i will always ask is :
** what is the differance between a[0] and *a.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mallik
a[0] represents only that value at 0 location,but *a
represents the address of that variable stored
| Is This Answer Correct ? | 0 Yes | 0 No |
give one ip, find out which contry
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 ?????? */ }
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
What is the best way of making my program efficient?
which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;
how to execute a program using if else condition and the output should enter number and the number is odd only...
the maximum width of a c variable name can be a) 6 characters b) 8 characters c) 10 characters d) 20 characters
Are enumerations really portable?
What is typeof in c?
What are linked lists in c?
List the variables are used for writing doubly linked list program.
When is the “void” keyword used in a function?