ALLInterview.com :: Home Page            
 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                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2262)
 C++ interview questions  C++ Interview Questions (1118)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
Question
can we define a function in structure?
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
We Can't define function inside the structure 
Is This Answer Correct ?    4 Yes 3 No
Sandeep
 
Answer
# 2
structure is nothing but user defined data types...
structure used then more then one datatypes used in single
strud\cture...
syntax:
struct [struct_name]
{
datatype var1;
...
...
};
struct variable creation:
syntax:
struct [name]
{
...
...
}[struct var_name];
[struct var_name].variablename;
.......................................
ex:
 
Is This Answer Correct ?    0 Yes 5 No
Anandhi
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what is c   1
write an algorithm and a program to count the number of elements in a circularly singly linked list Ignou 1
How would you write qsort?   1
code snippet for creating a pyramids triangle ex 1 2 2 3 3 3   4
int *p=20; if u print like dis printf("%d",p); o\p:- 20; how is it possible? plz give me the explanation. Global-Edge 14
What does a run-time "null pointer assignment" error mean?   2
How the processor registers can be used in C ? HP 6
number 2 plssssss help !!....using array.. turbo c.. create a program that will accept a number and determine if it is a happy number or an unhappy number.. example: enter a number : 7 7*7=49 then 4 and 9 4*4 and 9*9== 16 + 18 gives you 97 then 9 and 7 9*9 and 7*7 == 81 + 49 gives you 130 then 1 and 3 1*1 and 3*3 == 1 + 9 gives you 10 1*1 gives you 1 sample output: 7= 49= 16+81= 97= 81+49=130 =1+9=10 =1 "7 is a happy number" . if the last number is 2 then the number being inputed is not a happy number.   3
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a   6
Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; } Qualcomm 3
A woman had somany gloves and hats 22 red,34 blue, 45 white...there was power cut and she took a glove and how many gloves shud she take so that she gets a pair of glove fr each color?? TCS 3
write a c program to find the square of a 5 digit number and print the result. Accenture 4
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com