C interview questions – page 13
2,130 questions. Tap “Show answer” to check yourself.
-
X = fopen (b, c) what is b? a) pointer to a character array which contains the filename b) filename whithin double quotes c) can be anyone of the above d) none
-
Write a program which accepts a filename as a command line argument and reverses the contents of the file( ie first character becomes the last character of the file and so on) Input: The program takes the file name whose content should be reversed. Output
-
What would be the output of the following program? main() { int i=4; switch(i) { default: printf("n A mouse is an elephant built by the Japanese"); case 1: printf(" Breeding rabbits is a hair rai
-
which of s, t and u are availeble to a function present in another file a. only s b. s & t c. s, t, u d. none ...
-
What is extern?
-
If the following program (myprog) is run from the command line as myprog friday tuesday sunday, What would be the output? main(int argc, char *argv[]) { printf("%c",*++argv[1]); }
-
Int i = 20; printf ("%x", i); what is the output? a) x14 b) 14 c) 20 d) none of the above
-
What is the output of the above program segment ?
-
Pick up the correct function declaration.
-
When you compiler a C and C++ code on X86 processor, what are the difference you see in object file?
-
1.WAP find the largest of 4 no using macros2.WAP read a line from file from location N1 to N2 using command line agruments Eg:exe 10 20 a.c
-
What is the output of the following program:int main(){ char buff[]={ 0x11,0x11,0x11,0x11,0x22,0x22,0x22,0x22,0x33,0x33,0x33,0x33}; char* pEnd = buff + sizeof(buff) -1; long * plong = buff; short* pshort = buff; for(; plong<pEnd; plong++)
- Advertisement
-
Give difference between structure and union and demonstrate union uses with examples.
-
Read the function conv() given below
-
when redirected to a screen what will be printed. 2 when redirected to file what will be printed.
-
Z = scanf("%d %d", &x, &y); printf("%d", z);
-
For(i=0; i<=10; i++, printf("%d",i));
-
What is the output of the program?
-
What is :- Token , identifier , block , parameter , argument , scope of variable , Macro ?
-
Which of the following about automatic variables within a function is correct ?
-
Given definition for a function which returns an array of pointers with argument of int*.
-
How do u have constant members in a class?
-
What is the value of *p; a) 2 b) 3 c) 4 d) 5 2) What is the value of (p - (&p - 2))? a) b) 2 c) d)
-
Sizeof(structure)?
- Advertisement
-
Write your own grep command in C. your program should handle basic regular expressions like * , . , ^ , $
-
1)What is static identifier? 2)Where are the auto variables stored?
-
A variable carries a value.(already assigned OR from Scanf..what ever the way). I want to know whether the variable is positive or negative.Conditions:-----------1.NO looping logic should be used such as for ..while..etc.2.should not use > or <.3.should n
-
Main must be written as
-
Assume necessary header files are included. O/P ?
-
Which of the following about the C comments is incorrect ?