ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories >> Software >> Programming-Languages >> C
 
 


 

Back to Questions Page
 
Question
wt is d full form of c
Rank Answer Posted By  
 Question Submitted By :: Satya.babi
This Interview Question Asked @   Wipro
I also faced this Question!!   © ALL Interview .com
Answer
computing language
 
0
Satya.babi
 
 
Question
What is volatile in c language?
Rank Answer Posted By  
 Question Submitted By :: Dhakar123
This Interview Question Asked @   HCL
I also faced this Question!!   © ALL Interview .com
Answer
compiler should not make any assumption about the variable 
which declared as volatile.
 
0
Venkata Mahesh
 
 
Question
what is available in C language but not in C++?
Rank Answer Posted By  
 Question Submitted By :: Maayasweety
I also faced this Question!!   © ALL Interview .com
Answer
In c u can create variable with name new and delete but not
in c++.
 
0
Mukhtar
 
 
 
Question
what is self refrential structure
Rank Answer Posted By  
 Question Submitted By :: Alok.chauhan9
This Interview Question Asked @   HCL
I also faced this Question!!   © ALL Interview .com
Answer
if a structure tag is a datatype of a variable or data
member then it is known as a self referential structure.


for ex
template <class t>

  struct node
   { 
    t data;
    node *link;//here link is a variable which contains data
type of structuretag ie node
    }
 
0
Silpa
 
 
Answer
whenever a structure is been pointed by the same structure
pointer which is the member of the same structure is called
as self referential structure....


thank u
 
0
Vignesh1988i
 
 
Question
write a program to compare 2 numbers without using logical
operators?
Rank Answer Posted By  
 Question Submitted By :: Maddy143
This Interview Question Asked @   IBM
I also faced this Question!!   © ALL Interview .com
Answer
main()
{
int x,y;
sf("%d,%d",&x,&y);
if(x^y)
pf("not equal");
else
pf("equal");
}
 
0
Bashu
 
 
Question
what is the definition of storage classes?
Rank Answer Posted By  
 Question Submitted By :: Nirmal
This Interview Question Asked @   Wipro
I also faced this Question!!   © ALL Interview .com
Answer
at the level of the language as a storage class persistence 
is defined on ... A program written in C is passed through 
a precompilation phase in which the statements related to 
persistence are converted into their corresponding storage 
system calls.
 
0
Venkata Mahesh
 
 
Question
What is the output of following program ?

int
main()
{
   int x = 5;
   printf("%d %d %d\n", x, x << 2, x >> 2);
}
Rank Answer Posted By  
 Question Submitted By :: Qint
This Interview Question Asked @   Qualcomm
I also faced this Question!!   © ALL Interview .com
Answer
5 20 1
 
0
Qint
 
 
Answer
4,4,1
coz we shift the bit as 5=101  now shift two bit to right as
101>>2=001
now
2<<001=100
noe x=4
printf execute from right to left so ans is 4,4,1
 
0
Krishna Deep Sharma
 
 
Answer
4 4 1  is the output....

here the operation of STACK involves.... for these kind of statements (ie) statements having multiple values to get printed it is used..... so the very first element that goes inside stack is x , then x<<2 , then x>>2... so from the TOP it will be operated....
and print as the order given in printf statement..... :) 

thank u
 
0
Vignesh1988i
 
 
Question
Toggle nth bit in a given integer - num
Rank Answer Posted By  
 Question Submitted By :: Qint
This Interview Question Asked @   Qualcomm
I also faced this Question!!   © ALL Interview .com
Answer
num ^ (1 << n)
 
0
Qint
 
 
Answer
num=num ^ (1<<(n-1));
 
0
Sahil
 
 
Question
Binary tree traversing
Rank Answer Posted By  
 Question Submitted By :: Qint
This Interview Question Asked @   Qualcomm
I also faced this Question!!   © ALL Interview .com
Answer
void Traverse(Node *t)
{
   if(NULL == t)
       return;

   //in-order traversing
   Traverse(t->left);
   printf("%d",t->data);
   Traverse(t->right);

  //pre-order
  printf("%d",t->data);
  Traverse(t->left);
  Traverse(t->right);

  //post order
  Traverse(t->left);
  Traverse(t->right);
  printf("%d",t->data);
}
 
0
Qint
 
 
Question
Whats wrong with the following function

char *string()
{
   char *text[20];
   strcpy(text,"Hello world");
   return text;
}
Rank Answer Posted By  
 Question Submitted By :: Qint
This Interview Question Asked @   Qualcomm
I also faced this Question!!   © ALL Interview .com
Answer
1. returning address of a local variable.
2. wrong parameter passed to strcpy()
 
0
Qint
 
 
Answer
In this question ,two wrong thins ----
1.this is an array of char pointer so use 
  strcy(text[no.],"Hello World");

2.
 we are copying a string without allocating memory to pointer . This is bug code .

correct solution :----

char *string()
{
   char *text[20];
   text[0]=malloc(20*sizeof (char));
   strcpy(text,"Hello world");
   return text;
}
 
0
Avinash
 
 
Answer
as for as i know , there is only one error..... you have
declared text as array of pointers and not as character data
array..... so this text can only accept addresses.... :)  

char *text[20] means you are going to store 20 addresses in
this array..... When you store addresses using arrays , the
that is called array of pointers....

if u declare :   char text[20] , this will work correctly..



thank u
 
0
Vignesh1988i
 
 
Question
write a c program to find biggest of 3 number without
relational operator?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Wipro
I also faced this Question!!   © ALL Interview .com
Answer
void main()
{
int a = 5;
int b = 7;
int c = 2;
int res;

res = (int)(a/b)?a:b;
res = (int)(res/c)?res:c;

printf("big num = %d",res);
}
 
0
Manjeeth
 
 
Answer
#include<stdio.h>
#include<conio.h>
void main()
int a,b,c;
clrscr();
printf("enter any three no.s");
scanf("%d%d%d",&a,&b&c);
if(a>b&&a>c);
{
printf("a is biggest");
}
else if(b>a&&b>c)
{
printf("b is biggest");
}
else
printf("c is biggest");
getch();
}
 
0
Priyanka
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com