| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Name the language in which the compiler of "c" in written? | Bajaj | 1 |
| const char *
char * const
What is the differnce between the above tow?.
| TCS | 5 |
| what is dangling pointer? | LG-Soft | 1 |
| Can I pass constant values to functions which accept structure
arguments? | | 2 |
| Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 4 |
| How can I read a directory in a C program? | Wipro | 1 |
| here is a link to download Let_Us_C_-_Yashwant_Kanetkar | | 2 |
| Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2) | Subex | 2 |
| Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 5 |
| User define function contain thier own address or not. | | 2 |
| What is the output for the following program
#include<stdio.h>
main()
{
char a[5][5],flag;
a[0][0]='A';
flag=((a==*a)&&(*a==a[0]));
printf("%d\n",flag);
}
| ADITI | 5 |
| create an SINGLE LINKED LISTS and reverse the data in the
lists completely | | 3 |
| What is structure padding ? | HP | 2 |
| helllo sir ,
what is the main use of the pointer ,array ,and the
structure with the example of a programe | | 2 |
| c programming of binary addition of two binary numbers
| | 1 |
| What are Storage Classes in C ? | HP | 15 |
| write a function which accept two numbers from main() and
interchange them using pointers? | | 3 |
| pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used. | Persistent | 4 |
| Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV
| Accenture | 3 |
| suppose we use switch statement and we intilize years name
using enum statement like(jan,feb,mar,------dec) we take
integer value as an input .question is that the month which
we analyz is from 0 to 11 bt if i enter 12 than how he
again starts from begning and print jan | | 1 |
| |
| For more C Interview Questions Click Here |