New C Interview Questions :: ALLInterview.com http://www.allinterview.com New C Interview Questions en-us If we give two names then this displays the connection between the t http://www.allinterview.com/showanswers/100196.html main() { char name1[20],name2[20]; int a,b,i,j,c; clrscr(); printf("Enter the first name:\t"); gets(name1); printf("Enter the second name:\t"); gets(name2); a=strlen(name1); b=strlen(name2); for(i=0;i<=a; please give me answer with details #include&lt;stdio.h&gt; main() { http://www.allinterview.com/showanswers/100194.html Answer is :64 WAP to convert text into its ASCII Code and also write a function to http://www.allinterview.com/showanswers/100149.html to convert it into ascii code just assign the entered variable to a int(integer)variabe e.g. int i=a which on printing i will gie 64 as the o/p What is the relation between # and include&lt;stdio.h&gt; http://www.allinterview.com/showanswers/100069.html include<stdio.h> means we include standard input and output functions code we does not write any thing about library functions .h means header file if we include tis header file then we place # before the include<stdio.h> this is c Given a single Linked list with lakhs of nodes and length unknown how http://www.allinterview.com/showanswers/99961.html first create the list of unknown length..... then get the position of the element to be deleted from the user.... the start travelling in the list.... if it encounters the position prescribed by the user ... get the addresses in the list and shift th Why cann&#039;t whole array can be passed to function as value. http://www.allinterview.com/showanswers/99932.html ya it's possible ..... we can pass whole array as an value.... let's take the code : void function(char [] ); void main() { char ch[30]; function(ch); getch(); } void function(char ch[]) { printf("%s",ch); } t differentiate between const char *a; char *const a; and char con http://www.allinterview.com/showanswers/99377.html const char *a : means the string is constant and the pointer is not... const char *a="HELLO WORLD" , if we take this example for the whole scope of the program the string is constant and we can't assign any other string to that p what is the difference between these initializations? Char a[]=”stri http://www.allinterview.com/showanswers/99376.html surely there is some difference..... here 'a' is represented as array in which string gets stored in consecutive locations...... p is a pointer variable where string is initilized... so in p the base address of "literal " Given an unsigned integer, find if the number is power of 2? http://www.allinterview.com/showanswers/99375.html #include<stdio.h> void powerOfTwo(int number) { if(!(number & number-1) && number) printf("\nthe number is a power of 2\n"); else printf("\nThe number is not a power of 2\n"); } int main() { write a program that print itself even if the source file is deleted? http://www.allinterview.com/showanswers/99374.html int main(s){ s="int main(s){s=%c%s%c;printf(s,34,s,34);return 0;}"; printf(s,34,s,34); return 0; } Give a method to count the number of ones in a 32 bit number? http://www.allinterview.com/showanswers/99373.html #include<stdio.h> #include<conio.h> void main() { unsigned i; int j=0,count=0;; printf("Enter the number :"); scanf("%ld",&i); while(j<=31) { if(!(((i>>j)&1)^1)) count++; j++; } prin write a “Hello World” program in “c” without using a semicolon? http://www.allinterview.com/showanswers/99372.html sir, i can not give the answer of this question. write a program that finds the factorial of a number using recursion? http://www.allinterview.com/showanswers/99371.html #include<stdio.h> #include<conio.h> void main() { int factorial(int); int n; clrscr(); printf("Enter a number: "); scanf("%d",&n); printf("Factorial of %d is: %d",n,factorial(n)); getch(); } i how do you redirect stdout value from a program to a file? http://www.allinterview.com/showanswers/99370.html swap two integer variables without using a third temporary variable? http://www.allinterview.com/showanswers/99369.html the best way what i choose is that : if x=89 , y=-88 x^=y^=x^=y; this line will swap the above numbers...... thank u