Dataware housing interview question and answers

What is Data warehousing?
A data warehouse can be considered as a storage area where interest specific or relevant data is stored irrespective of the source. What actually is required to create a data warehouse can be considered as Data Warehousing. Data warehousing merges data from multiple sources into an easy and complete form.
Data warehousing - What is Data warehousing? - May 11, 2009 at 13:40 pm by Vidya Sagar
Data warehousing is a process of repository of electronic data of an organization. For the purpose of reporting and analysis, data warehousing is used. The essence concept of data warehousing is to provide data flow of architectural model from operational system to decision support environments.

HP Technical interview for fresher

HP Technical interview for fresher
Some of the basic questions :
1) HP acquired this company in 2002. Which is the company
a)Compaq b)Dell c)option 3 d) Option4
Ans: a
2) what does 3G denote
a) 3rd generation mobile communication b) 3rd generation computer languages c) option 3 d) option4
Ans: a
3)an application program that is used by the users to get the inofrmation from the backend of some application like databases:
a) application server b)proxy server c)database server d)option 4
Ans: database server
4) which of the following is not true about the e-mail
a) it can be accessed by a client program using POP
b) it can be accessed by a client program using imap protocol
c) option 3
d) option 4
Ans: I don't remember the answer but first 2 are true.
5) Some quesion regarding the company and who developed it ( the thing to remember is that Apple produce Macintosh computers).
HP Technical Test Questions:
1) IRC stands for ans) Internet Relay chat
2)ICQ stands for ans)--------------------
3)The protocol used to translate Internet address to
Network addressis
4)In some OS the option that the system provides to
communicate with
other process is
1)IPC(Inter Process Communication)2)----3)-----4)-----
5)VPN stands for ans) Virtual private network.
6)The time taken to transfer data from one place to other
place or
process within specified time is
1)Throughput2)Latency time 3)Response time 4)----------
7)The time complexity for which of the following is O(n log
1) Radix sort 2)Quick sort3)Shell sort 4) Bubblesort.
8)Which of the following is used pass the packets between
HP C Language Questions:
1)Which of the following can be used to print % to the
1) printf("\%");2)printf("\\%"); 3)----- 4)------
2)how many times the loop is executed
int i=3;
1) 3 2)Infinite 3)0 4)2
3) what is the output
int 1=10;
printf("%d %d %d ",i,++i,i++);
1) 10 11 11 2)11 11 10 3) 10 11 10 4) None of the above
z=x+++y;printf("%d %d %d",x,y,z);
1)----------- 2)------- 3)--------- 4)---------
5)In c++,
3)you cannot Overload new operator for a class
Void xyz(char a[10])
{int i;
1)10 2)can't say 3) 2 4)same as size of pointer.
7) Local Variables is stored in which part of the memory
1) register or heap 2)heap 3)register or stack 4)-----
8) which of the following can be shared by progams
1)Text Code
2)Data segment
3)heap memory

L&T Infotech Technical Interview Questions

L&T Infotech Technical Interview for Fresher
Engineering syllabus based Technical Test
Some of the questions asked in L & T Infotech :
a) What is reverse engineering.
b) Octal of some binary number(comes to 165 in decimal after conversion).
c) A cobol prog with an integer array(I guess coz i did not have Cobol in my syllabus).
d) A problem on Depth first search(very simple).
e) Question on Grammar's frm Theory of computer science.
f) Something like Select the correct option when A Subset of(B Subset of(A Intersection B).if B is completely contained by A.
g) A question on memory(quite simple).
h) A couyple of questions on C(one on pointers)

Some More Technical Questions asked in L & T Infotech :
1. what is an inode in unix?
2. small program in pascal to add a node to a linked list. (You have totell what the program does)
3. C strcmp program (You have to tell what the program does)
4. set of dos commands testing basic familiarity with dir, ren *.t?t, cd etc.
5. what is the order of binary search?
6. what is the order of strassens matrix multiplication?
7. you have to maintain the sorted order of integers and insert integers . which data structure would you use? (tree, list, queue, array?)
8. There are two lists of integers to be merged. Which method would you not use?
9. In an online database system when is data written to disk? (on pressing enter, when commit
10. Convert this binary into octal. 010 100 101
11. Lisp program given. what does it do? (GCD, LCM, Multiplies mxn?)
12. What is paging?
13. what is segmentation?
14. 2/3 questions on equivalence class, associative and commutative properties.
15. One figure given, give regular expression for it (very basic).

SAP BASIS Interview question and answers

SAP-Basis Interview Questions
What is private mode? When does user switch to user mode?
Private mode is a mode where the heap data is getting exclusively allocated by the user and is no more shared across the system. This happens when your extended memory is exhausted.
What is osp$ mean? What if user is given with this authorisation?
OPS$ is the mechanism the adm users uses to connect to the database .
Why do you use DDIC user not SAP* for Support Packs and SPam?
Do _NOT_ use neither DDIC nor SAP* for applying support packages. Copy DDIC to a separate user and use that user to apply them.
Can you kill a Job?
Yes - SM37 - select - kill
If you have a long running Job, how do you analyse?
Use transaction SE30.
How to uncar car/sar files in a single shot?
on Unix:
$ for i in *.SAR; do SAPCAR -xvf $i; done
When we should use Transactional RFC ?
A "transactional RFC" means, that either both parties agree that the data was correctly transfered - or not. There is no "half data transfer".
What is the use of Trusted system. I know that there is no need of UID and PWD to communicate with partner system. In what situation it is good to go for Trusted system ?

E. g. if you have an R/3 system and a BW system and don't want to maintain passwords. Same goes for CRM and a lot of other systems/applications.
Let me know if my understanding below is correct:
1) By default the RFC destination is synchronous
2) Asynchronous RFC is used incase if the system initiated the RFC call no need to wait for the response before it proceeds to something else.
Yes - that's right.
But keep in mind, that it's not only a technical issue whether to switch to asynchronous. The application must also be able to handle that correctly.
Which table contains the details related to Q defined in SPAM? Is there a way to revert back the Q defined? If yes, How?
There is a "delete" button when you define the queue. If you already started the import it's no more possible since the system will become inconsistent.
What is a developer key? and how to generate a developer key?
The developer key is a combination of you installation number, your license key (that you get from and the user name. You need this for each person that will make changes (Dictionary or programs) in the system.
What is XI3.0 ? EXPLAIN XI = Exchange Infrastructure - Part of Netweaver 2004.
SAP Exchange Infrastructure (SAP XI) is SAP's enterprise application integration (EAI) software, a component of the NetWeaver product group used to facilitate the exchange of information among a company's internal software and systems and those of external parties. Like other NetWeaver components, SAP XI is compatible with software products of other
SAP calls XI an integration broker because it mediates between entities with varying requirements in terms of connectivity, format, and protocols. According to SAP, XI reduces integration costs by providing a common repository for interfaces. The central component of SAP XI is the SAP Integration Server, which facilitates interaction between diverse operating systems and applications across internal and external networked computer systems.
How to see when were the optimizer stats last time run? We are using win2k, oracle 9, sapr346c.
Assumed DB=Oracle
Select any table lets take MARA here but you should do the same for MSEG and few others to see whether the dates match or not.Run the following command on the command prompt:-
select last_analyzed from dba_tables where table_name like '%MARA%';


Stack concepts in dotnet
Stack is a collection that works on the Last In First Out (LIFO) principle,
i.e., the last item inserted is the first item removed from the collection.
Push=> To add element and
Pop=> To Remove element
ook this example

See the below program you understand clearly
using System;
using System.Collections;
class Test
static void Main()
Stack stack = new Stack();
while(stack.Count != 0)


ATG interview Questions

1. What are the two methods in a component
2. Have you worked with repositories
3. Name 2 types of tables(primary and auxillary)
4. Have you worked on shopping carts
5. Name 2 types of checkout
6. Difference between Express Checkout and Checkout
7. What is BCC
8. What are custom dsp tags
9. Difference between droplet, FormHandler and servlet:

10. Difference between dsp and dspel tags
11. what is Nucleus
12. difference between dsp: include and jsp:include
13. How to implement shopping cart
14. What is the main formhandler you use for Shopping cart
15. what are the ATG component scopes(global session and request)
16. what are the Advantages of DAF
17. What is a Component
18. What are scenarios
19. what is a pipeline
20. Is DAS for high volume or low volume traffic
21. What are the performance issues with ATG
22. Why is eclipse used with ATG
23. Which is the IBM product used with ATG
24. What are derived properties
25. If you are given an application what are the steps involved in implementing it on ATG server
26. which version of J2EE ATG supports
27. Difference between Item Cache and Query cache28. What are different types of Repository caches
29. which are the handleX methods in
30. What are priceLists

What are the core components in Hibernate ?

What are the core components in Hibernate ?

SessionFactory (org.hibernate.SessionFactory)
A threadsafe (immutable) cache of compiled mappings for a single database. A factory for Session and a client of ConnectionProvider. Might hold an optional (second-level) cache of data that is reusable between transactions, at a process- or cluster-level.
Session (org.hibernate.Session)
A single-threaded, short-lived object representing a conversation between the application and the persistent store. Wraps a JDBC connection. Factory for Transaction. Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier.
Persistent objects and collections
Short-lived, single threaded objects containing persistent state and business function. These might be ordinary JavaBeans/POJOs, the only special thing about them is that they are currently associated with (exactly one) Session. As soon as the Session is closed, they will be detached and free to use in any application layer (e.g. directly as data transfer objects to and from presentation).
Transient and detached objects and collections
Instances of persistent classes that are not currently associated with a Session. They may have been instantiated by the application and not (yet) persisted or they may have been instantiated by a closed Session.
Transaction (org.hibernate.Transaction)
(Optional) A single-threaded, short-lived object used by the application to specify atomic units of work. Abstracts application from underlying JDBC, JTA or CORBA transaction. A Session might span several Transactions in some cases. However, transaction demarcation, either using the underlying API or Transaction, is never optional!
Hibernate 3.0.2 9
ConnectionProvider (org.hibernate.connection.ConnectionProvider)
(Optional) A factory for (and pool of) JDBC connections. Abstracts application from underlying Datasource or DriverManager. Not exposed to application, but can be extended/implemented by the developer.
TransactionFactory (org.hibernate.TransactionFactory)
(Optional) A factory for Transaction instances. Not exposed to the application, but can be extended/ implemented by the developer.
Extension Interfaces
Hibernate offers many optional extension interfaces you can implement to customize the behavior of your persistence layer. See the API documentation for details.

What is the difference between hibernate and jdbc ?

What is the difference between hibernate and jdbc ?
1) Hibernate is data base independent, In case of JDBC query must be data base specific.
2) As Hibernate is set of Objects , SQL Language learning is not required. TABLE can be treated as Java Object 3) Don?t need Query tuning in case of Hibernate. If you use Criteria Quires in Hibernate then hibernate automatically tuned your query and return best result with performance. In case of JDBC you need to tune your queries.
4) You will get benefit of Cache. Hibernate support two level of cache. First level and 2nd level. So you can store your data into Cache for better performance. In case of JDBC you need to implement your java cache .
5) Hibernate supports Query cache and It will provide the statistics about your query and database status. JDBC Not provides any statistics.
6) Development fast in case of Hibernate because you don?t need to write queries
7) No need to create any connection pool in case of Hibernate. You can use c3p0. In case of JDBC you need to write your own connection pool
8) In the xml file you can see all the relations between tables in case of Hibernate. Easy readability.
9) You can load your objects on start up using lazy=false in case of Hibernate. JDBC Don?t have such support. <> 10 ) Hibernate Supports automatic versioning of rows but JDBC does not.

ATG consultant Interview Faqs

ATG consultant Interview Faqs
1. Which versions of ATG have you worked with?
2. What parts of ATG’s stack have you worked with?
3. How do you compare ATG with Ruby on Rails?
4. What is Nucleus?
5. What is the ATG Repository?
6. When creating form handlers typically what ATG base class do you extend?
7. When creating droplets what ATG base class do you extend?
8. What form handlers and methods do you use during checkout? ShoppingCartFormHandler, numerous handlers like handleMoveToConfirm, etc.
9. What does a user typically see during checkout? Add to shopping cart, login, billing and shipping address, payment, confirm, confirmation, email confirmation, shipped email.
10. How do you compare strings in Java? If String a = “hello” and String b= “hello” what is a == b? True, a and b both reference the same constant string.
11. What is HTTP? How does it work?
12. If HTTP is stateless then how does a web application maintain state.

Struts Interview questions

Struts Interview questions
Q. What is Struts
A. Struts is a J2EE Design Pattern
Struts follows Model-View-Controller (MVC) design paradigm for application architectures. The main component of the Struts framework is the flexible control layer based on standard technologies like Java Servlets, JavaBeans, ResourceBundles, and XML, as well as various Jakarta Commons packages. Struts provides its own Controller component which can be easily be integrated with Model and View layers of other technologies. For the Model, Struts can interact with standard data access technologies, like JDBC and EJB, as well as most any third-party packages, like Hibernate, iBATIS, or Object Relational Bridge. For the View, Struts allows to integrate JavaServer Pages, including JSTL and JSF, as well as Velocity Templates, XSLT, and other presentation systems.
Q. What is ActionServlet?
A. Struts Controller class is named as ActionServlet.
It is the core of Struts Framework. The fully qualified name for this is org.apache.struts.action.ActionServlet. This Controller class is responsible for handling all the requests. It takes the requests, analyzes its type and forwards to the respective Model components.
Q. How is Struts Organized? What is the flow of control in Struts?
ActionServlet provides the "controller" in the Model-View-Controller (MVC) design pattern for web applications that is commonly known as "Model 2". This nomenclature originated with a description in the JavaServerPages Specification, version 0.92, and has persisted ever since (in the absence of a better name).
Generally, a "Model 2" application is architected as follows:
* The user interface will generally be created with server pages, which will not themselves contain any business logic. These pages represent the "view" component of an MVC architecture.
* Forms and hyperlinks in the user interface that require business logic to be executed will be submitted to a request URI that is mapped to this servlet.
* There can be one instance of this servlet class, which receives and processes all requests that change the state of a user's interaction with the application. The servlet delegates the handling of a request to a @link(RequestProcessor) object. This component represents the "controller" component of an MVC architecture.
* The RequestProcessor selects and invokes an @link(Action) class to perform the requested business logic, or delegates the response to another resource.
* The Action classes can manipulate the state of the application's interaction with the user, typically by creating or modifying JavaBeans that are stored as request or session attributes (depending on how long they need to be available). Such JavaBeans represent the "model" component of an MVC architecture.
* Instead of producing the next page of the user interface directly, Action classes generally return an @link(ActionForward) to indicate which resource should handle the response. If the Action does not return null, the RequestProcessor forwards or redirects to the specified resource (by utilizing RequestDispatcher.forward or Response.sendRedirect) so as to produce the next page of the user interface.
The standard version of RequestsProcessor implements the following logic for each incoming HTTP request. You can override some or all of this functionality by subclassing this object and implementing your own version of the processing.
* Identify, from the incoming request URI, the substring that will be used to select an action procedure.
* Use this substring to map to the Java class name of the corresponding action class (an implementation of the Action interface).
* If this is the first request for a particular Action class, instantiate an instance of that class and cache it for future use.
* Optionally populate the properties of an ActionForm bean associated with this mapping.
* Call the execute method of this Action class, passing on a reference to the mapping that was used, the relevant form-bean (if any), and the request and the response that were passed to the controller by the servlet container (thereby providing access to any specialized properties of the mapping itself as well as to the ServletContext).
Q. What all design patterns does struts implement?
Struts controller uses the command design pattern and the action classes use the adapter design pattern. The process() method of the RequestProcessor uses the template method design pattern. Struts also implement the following J2EE design patterns.
* Service to Worker
* Dispatcher View
* Composite View (Struts Tiles)
* Front Controller
* View Helper

What is ATG Dynamo? What is ATG Framework?

What is ATG Dynamo? What is ATG Framework?
Ans. ATG Dynamo or Dynamo Application Server(DAS) is a J2EE application server from Art Technology Group. Atg framework is a Web Application framework for building web applications. ATG dynamo implements the ATG framework. The application framework can also be run on all major J2EE application servers (JBoss, WebLogic, WebSphere etc...).

What is the scope of Dynamo Components? in ATG

What is the scope of Dynamo Components? in ATG
Ans. There are three different types of scopes for ATG components namely
1. request
2. session
3. Global
Global is the default scope

What is Nucleus? in ATG

What is Nucleus? in ATG
Ans.Nucleus is ATG`s open Object Application Framework. ATG 7 is said to be a component-centric development platform. The ATG 7 Web applications are nothing but individual JavaBean components assembled together. These JavaBean components are configured and linked together by .properties files within Nucleus.

In Nucleus, each service is packaged as a JavaBean or set of JavaBeans. These JavaBeans are configured individually and mounted into a namespace. The beans then interconnect with the beans representing other services. Nucleus is responsible for interpreting the component configurations and the management of the component namespace.
Dynamo uses the Nucleus framework to organize components into a hierarchical structure (similar to a directory structure). Each Nucleus service has a unique Nucleus name. For example, the default javax.sql.DataSource component is located at /atg/dynamo/service/jdbc/JTDataSource

Nucleus is the core of the entire ATG system. It creates and configures Nucleus components (also called beans and JavaBeans) and organizes them into a hierarchical namespace, essentially giving them a place to live so they can be referenced by other components. By reading the .properties files associated with each component, Its Nucleus which figures out that which components are to be used in an application ,initializes them to their default values and how decides about how they connect to each other. This model makes it easier for the developers to build ATG applications by configuring and using the pre-built components instead of writing a lot of Java code from scratch.

What is ATG Repository?

What is ATG Repository?
Ans.ATG Repository refers to the ATG`s way of accessing the Database through programs. It is somewhat similar to what Hibernate offers, Seperating the Application Logic from that of Database. So Atg repository provides a fine grained abstraction between the application logic and Database. Thus it supports the ATG`s Data Anywhere paradigm, the application logic created by developers to interact with data need not change for any change in the source of that data. ATG repository architecture ensures that the source of the data is hidden behind the Dynamo Repository abstraction. It would be easy to change from a relational data source to another or to an LDAP directory since none of the application logic would need to change. Once data is retrieved from a data source it is transformed into an object-oriented representation. Manipulation of the data can then be done using simple getPropertyValue and setPropertyValue methods. The Repository API ties in closely with ATG’s targeting APIs, so you can retrieve items from the repository based on a variety of targeting rules, as well as retrieving specific identified items.

ATG Interview questions,ATG Faqs for interview

ATG Interview questions,ATG Faqs for interview
1. What is Nucleus?
2. What is the ATG Repository?
3. When creating form handlers typically what ATG base class do you extend?
4. When creating droplets what ATG base class do you extend?
5. What form handlers and methods do you use during checkout? ShoppingCartFormHandler, numerous handlers like handleMoveToConfirm, etc.
6.What does a user typically see during checkout? Add to shopping cart, login, billing and shipping address, payment, confirm, confirmation, email confirmation, shipped email.

Convert Binary to Decimal Number in Java

Convert Binary to Decimal Number in Java
class Test
public static void main(String[] args) throws IOException
long no,n=0l,j=1,rem,no1;
System.out.println("Enter the binary number");
BufferedReader br=new BufferedReader(new InputStreamReader (;
System.out.println("The value of binary no. "+no1+" is "+n);

Java Interview Faqs

Java Interview Faqs
1. What is java run time environment?
2. How java is platform independent language?
3. What is difference between compiler and interpreter?
4. Java is secure language. Why?
5. Why main function in java is static?
6. What is abstract class and what is use of abstract class?
7. Why a class cannot be static?
8. Why abstract class cannot be final?
9. What is final class, final method and final variable?

A final class is special type of class which cannot be inherited i.e. we cannot create any subclass of final class. All the methods and variables of final class is also final.
A final method is special type of method which cannot be overridden in the subclass.
A final variable is special type of variable which after assigning a value at the time of declaration we cannot modified its value. It is necessary to initialize the final variable at the time of declation.

10. What is default access specificer?
11. What is static import in java?
12. What is difference between checked and unchecked exception?
13. What is wrapper class in java?
14. What is generic?
15. What is difference between throw and throws keyword?

Group Discussion Tips for Interview

Group Discussion Tips for Interview
1. Always be the initiator and concluder of the GD then being a participant.

2. But if you are participant always try to be the most vital/key participant.

3. put points firmly and always try to get others support too.

4. if you find that the discussion as going offtrack then never loose an opportunity to bring it back to stream this is the best point to score max.

5. try to keep latest information on the topic.

6. be very polite , people may try to provoke you to to get more points but try to keep cool.

7. most important don't wait for your turn to speak when discussion is on. interrupt politely if you want to put forward your points.

8. last but not the least keep an eye on the time given for discussion. score points by wrapping up the discussion if you feel that the discussion is heating but the time is going to be over.

9. during conclusion, do end with the conclusion note. that shows your leadership quality.

Best scoring points are:

1. initiation of discussion,
2.always keeping/trying to keep discussion on track
3. conclusion on time
4. your capability to keep your cool and listen as well as putting your points.

Questions to Ask Hr during Interview

Questions to Ask Hr during Interview
# Why do you enjoy working for this company?
# What attracted you to this organization?
# Can you describe the work environment here?
# How do you describe the philosophy of the company or organization?
# What do you consider to be the organization’s strengths and weaknesses?
# Can you tell me more about my day-to-day responsibilities?
# How soon are you looking to fill this position?
# How do my skills compare with those of the other candidates you have interviewed?
# I have really enjoyed meeting with you and your team, and I am very interested in the opportunity. I feel my skills and experience would be a good match for this position. What is the next step in your interview process?
# Before I leave, is there anything else you need to know concerning my ability to do this job?
# In your opinion, what is the most important contribution that this company expects from its employees?
# What are my prospects for advancement? If I do a good job, what is a logical next step?
# Assuming I was hired and performed well for a period of time, what additional opportunities might this job lead to?
# Do the most successful people in the company tend to come from one area of the company, such as sales or engineering, or do they rise from a cross section of functional areas?
# How does this position relate to the bottom line?
# What advice would you give to someone in my position?
# What major problems are we facing right now in this department or position?
# Can you give me a formal, written description of the position? I’m interested in reviewing in detail the major activities involved and what results are expected.
# Does this job usually lead to other positions in the company? Which ones?
# Can you please tell me a little bit about the people with whom I’ll be working most closely?
# As I understand the position, the title as ________, the duties are _______, and the department is called ________. I would report directly to __________. Is that right?
# Can you talk about the company’s commitment to equal opportunity and diversity?
# Who are the company’s stars, and how was their status determined?
# How are executives addressed by their subordinates?
# What can you tell me about the prevailing management style?
# If you hired me, what would be my first assignment?
# Does the company have a mission statement? May I see it? Does the company have a mission statement? May I see it?

Questions we can ask HR between the interview process

Questions we can ask HR between the interview process

1. How do you like me so far?
2. Do you have any concerns about my ability to do the job and fit in?
3. Is there anything standing in the way of us coming to an agreement?
4. Do you have any concerns about my experience, education, skills?
5. How do I compare with the other candidates you have interviewed?
6. Describe your ideal candidate. What do my qualifications lack compared to those of the theoretical ideal candidate?
7. I’m ready to make a decision based on the information I have. Is there anything else I can elaborate on so that you would have a better understanding of my qualifications and suitability for this position?
8. Are there any areas in which you feel I fall short of your requirements?
9. Can you give me any feedback that would make me more attractive to the company in the future or that I could benefit from next time?
10. Is there anything else you need from me to have a complete picture of my qualifications?
11. Is there anything personally or professionally that you believe would prevent my being a solid contributor in this role?
12. Your search is over. You will not find anyone else more qualified to do this job than I. If I were you, I’d cancel all the other interviews and make me an offer.
13. I’m not going to keep it a secret. I really want this job, and I know I will be fantastic in it.
14. Until I hear from you again, what particular aspects of the job and this interview should I be considering?
15. I know I can meet the demands of the position and would make an outstanding contribution. Can I have the offer?
16. What will be your recommendation to the hiring committee?
17. I’m ready to make a decision based on the information I have. Is there anything else you need to make me an offer?
18. I am very interested in this job, and I know your endorsement is key to my receiving an offer. May I have your endorsement?
19. It sounds to me as if we have a great fit here. What do you think?
20. It has been an interesting and fruitful discussion. l would very much like to take it to the next step.

What is relative path and absolute path.

What is relative path and absolute path.
Absolute path : Exact path from root directory.
Relative path : Relative to the current path.

Explain kill() in unix and its possible return values.

Explain kill() in unix and its possible return values.
There are four possible results from this call:
‘kill()’ returns 0. This implies that a process exists with the given PID, and the system would allow you to
send signals to it. It is system-dependent whether the process could be a zombie.
‘kill()’ returns -1, ‘errno == ESRCH’ either no process exists with the given PID, or security enhancements
are causing the system to deny its existence. (On some systems, the process could be a zombie.)
‘kill()’ returns -1, ‘errno == EPERM’ the system would not allow you to kill the specified process. This means
that either the process exists (again, it could be a zombie) or draconian security enhancements are present
(e.g. your process is not allowed to send signals to *anybody*).
‘kill()’ returns -1, with some other value of ‘errno’ you are in trouble! The most-used technique is to assume
that success or failure with ‘EPERM’ implies that the process exists, and any other error implies that it
An alternative exists, if you are writing specifically for a system (or all those systems) that provide a ‘/proc’
filesystem: checking for the existence of ‘/proc/PID’ may work.

What is a pipe in unix and give an example?

What is a pipe in unix and give an example?
A pipe is two or more commands separated by pipe char '|'. That tells the shell to arrange for the output of
the preceding command to be passed as input to the following command.
Example : ls -l | pr
The output for a command ls is the standard input of pr.
When a sequence of commands are combined using pipe, then it is called pipeline.

What is the difference between cat and more command?

What is the difference between cat and more command?
Cat displays file contents. If the file is large the contents scroll off the screen before we view it. So
command 'more' is like a pager which displays the contents page by page.

What is the use of ‘grep’ command?

What is the use of ‘grep’ command?
‘grep’ is a pattern search command. It searches for the pattern, specified in the command line with
appropriate option, in a file(s).
Syntax : grep
Example : grep 99mx mcafile

What difference between cmp and diff commands

What difference between cmp and diff commands
cmp - Compares two files byte by byte and displays the first mismatch
diff - tells the changes to be made to make the files identical

Steps a shell follows while processing a command in Unix

Steps a shell follows while processing a command in Unix
After the command line is terminated by the key, the shel goes ahead with processing the command line in
one or more passes. The sequence is well defined and assumes the following order.
Parsing: The shell first breaks up the command line into words, using spaces and the delimiters, unless
quoted. All consecutive occurrences of a space or tab are replaced here with a single space.
Variable evaluation: All words preceded by a $ are avaluated as variables, unless quoted or escaped.
Command substitution: Any command surrounded by backquotes is executed by the shell which then
replaces the standard output of the command into the command line.
Wild-card interpretation: The shell finally scans the command line for wild-cards (the characters *, ?, [, ]).
Any word containing a wild-card is replaced by a sorted list of
filenames that match the pattern. The list of these filenames then forms the arguments to the command.
PATH evaluation: It finally looks for the PATH variable to determine the sequence of directories it has to search in order to hunt for the command.

SDLC Models

Different SDLC Models
Waterfall model
A1:It is a Traditional Model, In this Requirements are Freezed in Each and every phase of SDLC
A2: This is the simplest of all the models in SDLC.In this process the phases are organized in a linear and sequential order
What are the advantages & disadvantages of waterfall model
A: Easy to Understand and Coding, identifies deliverables and milestones, works well on mature products and weak teams Disadvantages: Requirements be completely
specified before the rest of the development.
What is Pro-type model
A: The basic idea behind this model is that instead of freezing the requirements before any design or coding, a prototype is built to understand the requirements.
What are the advantages & disadvantages of Pro-type model
A: Development and testing efforts are reduced, reduces risk of incorrect user requirements
Development costs may become large
Difficult to estimate the deliverables
What is spiral model
A: The key idea behind this model is to identify and solve the sub-program with the highest risk on each iteration and develop the software in an experimental way.
Each cycle follows a waterfall model by determining objectives, defining constraints; Generating alternatives, identifying and resolving risks, developing next level product and planning next cycle
What are the advantages & disadvantages of spiral model
Adv: it incorporates the advantages of the waterfall and prototype models, it reflects the iterative nature of software development on projects with unclear requirements
What it iterative model
A: It combines the advantages of both waterfall model and Prototype model. In this product should be developed in increments, each increment adding some functional capability to the system until the full system is implemented
What are the advantages & disadvantages of iterative model
Adv: Specifications are handy for the developers and therefore have control of the system
This model is most suitable for the product development.
Explain RAD model
A: It is an incremental software development process that emphasizes a very short development cycle; it is a high-speed adoption of the waterfall model, where the result of each cycle is fully functional

VB script Java script interview questions and answers

VB script Java script interview questions and answers
Name the 2 kinds of procedures in VBScript?
Sub procedure
Function procedure
VBScript variable names cannot exceed
255 characters
Which Keyword is used in VBScript to increase or decrease the counter variable by the value?

STEP KeyWord
What will be the Output of the following using JavaScript document.Write(Math.Round(6.7));
Which method is used to convert a string in to uppercase Letters using javascript?
Name the DatTypes of JavaScript?

JSP Interview Questions and answers

JAVA SCRIPT Interview Questions and answers
Can Javascript code be broken in different lines?
Breaking is possible within a string statement by using a backslash "\" at the end .
document.write("Good Morning. \
I am Mr. John");
But it is not possible within any other javascript statement.
Ex :
is possible but not
document.write \
("Good Morning. I am Mr. John");
What does break and continue statements do in JavaScript?
Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop in JavaScript.
Explain about the Boolean functions present in Javascript?
Three Boolean operators are present in Javascript they are
1) &&
2) II
3) /
All the operators are regarded as true unless the Javascript regards them as false. You can define these operators to make as statement false number0, null, undefined, or a string of length 0, etc. Boolean function performs these conversions explicitly.
What is the difference between an alert box and a confirmation box?
An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.
How to validate a Email-address, in Form using JavaScript?
We can validate it through the reg expressions. For example we can declare all the reg expressions of the email in a variable as follows.
var reg = /^([A-Za-z0-9_-.])+@([A-Za-z0-9_-.])+.([A-Za-z]{2,4})$/; We need to compare the actual value with this expression for the validation.
How do you declare 2 dimensional array in Javascript?
myarray[0][0]="Compaq 486"
myarray[0][1]="Compaq 586"
myarray[0][2]="Compaq 686"
myarray[1][0]="Dell 486"
myarray[1][1]="Dell 586"
myarray[1][2]="Dell 686"
myarray[2][0]="IBM 486"
myarray[2][1]="IBM 586"
myarray[2][2]="IBM 686"
How do you Implement Timer Control in Javascript?
set Timedout("alert('5 seconds')",5000); Here the argument 5000 shows the millisecond value.
Whether VBscript or Javascript which is better?
Javascript. Since it is platform independent.
Whether Javascript is a OOP's based language?
No. It doesn't support all the concepts of OOPS. It supports partially.

What is the difference between a Document Schema and a Property Schema? :Biztalk server

What is the difference between a Document Schema and a Property Schema? :Biztalk server
A document schema is used to define a message. It is a definition on an Xml message with optional extensions for flat files, EDI file, etc that enable the parsers to convert the native format into Xml.

A property schema is used to define message context properties. These can be of type MessageDataPropertyBase (the property value is promoted or demoted from/to the message itself) or MessageContextPropertyBase(property value only exists within the message context and can be set by adapters, pipelines or within orchestrations).

If you wish to promote a field from a message into the message context then you need to define a document schema and property schema. In the document schema you promote the required field using the property schema to define the property type that will be used in the message context.

What is the difference between Distinguished field and Promoted Property? :Biztalkserver

What is the difference between Distinguished field and Promoted Property? :Biztalkserver
Promoted properties can be accessed in Orchestrations, ports, pipelines, schemas.They Use server resources.
Distingished fields are light weight and can be accessed only in Orchestrations.

What is Correlation in context of BizTalk Server?

What is Correlation in context of BizTalk Server?
Correlation is a process of associating an incoming message with the appropriate instance of an orchestration

What is Sharepoint?

What is Sharepoint?
Sharepoint is a Portal Collaboration Software provided by Microsoft , That can be configured to run Intranet, Extranet and Internet sites

What is the difference between SharePoint Portal Server and Windows SharePoint Services?

What is the difference between SharePoint Portal Server and Windows SharePoint Services? 5
SharePoint Portal Server is the global portal offering features like global navigation and searching.Windows SharePoint Services is more content management based with document libraries and lists. You apply information to certain areas within your portal from windows share point Services or directly to portal areas.

Microsost Sharepoint interview question and answers

Microsost Sharepoint interview question and answers
How do you install web parts In SharePoint?
to install web parts In SharePoint Web Parts should be distributed as a .CAB (cabinet) file using the MSI Installer.
What is a template in SharePoint?
A template is a pre-defined set of functions or settings that can be used over time. There are many templates within SharePoint software itself, Site Templates, Document Templates, Document Library and List Templates.
You can download More SharePoint templates from Microsoft site and the link is
What is a site definition in SharePoint?
A site definition is a methods in SharePoint for providing pre packaged site and list content.
How are web parts developed in SharePoint?
Web parts are developed in Visual Studio .Net. VS.Net offers many web part for SharePoint and page templates and can also be downloaded from the Microsoft Site and the link is.
How is security managed in SharePoint?
Security can in SharePoint be handled at the machine, domain, or SharePoint level.
What is a web part zone in SharePoint?
Web part zones in SharePont are what your web parts reside in and help categorize your web parts when designing a page.
What is the difference between a document library and a form library in SharePoint?
Document libraries in SharePoint consist of your main/core documents. For example a word document, excel, PowerPoint, Visio, pdf, csv, notepad etc. Form libraries consist of XML forms.
What is a document workspace in SharePoint?
Document workspaces in SharePoint consist of information surrounding a single or multiple documents.
What is a meeting workspace in SharePoint?
A meeting workspace in SharePoint is a place to store information, attendees, and tasks related to a specific meeting.
What is a document library in SharePoint?
A document library in SharePoint is where you upload your main or core documents. Document Library is consist of a row and column view with links to the documents, When the document is updated and so is the link is created on your site. You can also track metadata of your documents. Meta data in SharePoint is consisting of document properties.

Sharepoint Interview question and Answers 3

Sharepoint Interview question and Answers 3
Can I post any kind of document in Sharepoint Website?
You can post documents in many formats, including .pdf, .htm and .doc. In addition, if you are using Microsoft Office XP, you can save documents directly to your Windows SharePoint Services site.
How do I invite users to join a Windows SharePoint Services Site? Is the site secure?
SharePoint-based Web sites can be password-protected to restrict access to registered users, who are invited to join via e-mail. In addition, the site administrator can restrict certain members' roles by assigning different permission levels to view post and edit.
What suites of the 2007 Microsoft Office system work with Office SharePoint Server 2007?
Office Outlook 2007 provides bidirectional offline Synchronization with SharePoint document libraries, discussion groups, contacts, calendars, and Office Groove 2007, included as part of Microsoft Office Enterprise 2007, will enable bidirectional offline synchronization with SharePoint document libraries.Features such as the document panel and the ability to publish to Excel Services will only beenabled when using Microsoft Office Professional Plus 2007or Office Enterprise 2007.Excel Services will only work with documents saved in the new Office Excel 2007 file format(XLSX).
What is the difference between Microsoft Office SharePoint Server 2007 for Internet sites and Microsoft Office SharePoint Server 2007?
Microsoft Office SharePoint Server 2007 for Internet sites and Microsoft Office SharePoint Server2007 have identical feature functionality. While the feature functionality is similar, the usage rights are different.If you are creating an Internet, or Extranet, facing website, it is recommended that you use Microsoft Office SharePoint Server 2007 for Internet sites which does not require the purchase client access licenses. Websites hosted using an "Internet sites" edition can only be used for Internet facing websites and all content, information, and applications must be accessible to non employees.Websites hosted using an "Internet sites" edition cannot be accessed by employees creating, sharing, or collaborating on content which is solely for internal use only, such as an Intranet Portal scenario.
What are the main benefits of Office SharePoint Server 2007?
Office SharePoint Server 2007 provides a single integrated platform to manage intranet, extranet,and Internet applications across the enterprise.
* Business users gain greater control over the storage, security, distribution, and management of their electronic content, with tools that are easy to use and tightly integrated into familiar,everyday applications.
* Organizations can accelerate shared business processes with customers and partners across organizational boundaries using InfoPath Forms Services-driven solutions.
* Information workers can find information and people efficiently and easily through the-facilitated information-sharing functionality and simplified content publishing. In addition, access to back-end data is achieved easily through a browser, and views into this data can be personalized.
* Administrators have powerful tools at their fingertips that ease deployment, management, and system administration, so they can spend more time on strategic tasks.
* Developers
have a rich platform to build a new class of applications, called Office Business Applications, that combine powerful developer functionality with the flexibility and ease of deployment of Office SharePoint Server 2007. Through the use of out-of-the-box application services, developers can build richer applications with less code.
Who is Office SharePoint server 2007 designed for?
Office SharePoint Server 2007 can be used by information workers, IT administrators, and application developers.
What is Microsoft Windows SharePoint Services? How is it related to Microsoft Office SharePoint Server 2007?
Windows SharePoint Services is the solution that enables you to create Web site for information sharing and document collaboration. Windows SharePoint Services - a key piece of the information worker infrastructure delivered in Microsoft Windows Server 2003 - provides additional functionality to the Microsoft Office system and other desktop applications, and it serves as a platform for application development.Office SharePoint Server 2007 builds on top of Windows SharePoint Services 3.0 to provide additional capabilities including collaboration, portal, search,Enterprise content management,business process and forms, and business intelligence.
What are the differences between web part page gallery, site gallery,Virtual server gallery and online gallery in SharePoint?
Web Part Page Gallery in SharePoint is the default gallery provided by Microsoft that comes installed with SharePoint. Site Gallery is specific to one sharepoint website site. Virtual Server gallery is specific to that virtual server and online gallery is available for download web parts from MSDN.
What is a DWP SharePoint?
DWP is The file extension of a web part used in SharePoint.
What is CAML in SharePoint?
CAML stands for Collaborative Application Markup Language and is an XML-based language that is used in Microsoft Windows SharePoint Services to define sites and lists, including, for Eg, fields, views, or forms, but CAML is also used to define tables in the Windows SharePoint Services database during site provisioning.

Sharepoint Interview question and answers2

Sharepoint Interview question and answers 2
How customizable is the user-to-user access in SharePoint?
User permissions apply to an entire SharePoint Website, not to documents themselves. However, you can have additional sub webs that can optionally have their own permissions. Each user can be given any offer default roles. Additional roles can be defined by the administrator.
What is a workspace in SharePoint?
A site or workspace in SharePoint is when you want a new place for collaborating on Web pages, lists and document libraries. For example, you might create a site to manage a new team or project, collaborate on a document or prepare for a meeting.
What security levels are assigned to users for a SharePoint Website?
Security levels are assigned by the administrator who is adding the user. There are four levels by default and additional levels can be composed as necessary.
* Reader - Has read-only access to the Web site.
* Contributor - Can add content to existing document libraries and lists.
* Web Designer - Can create lists and document libraries and customize pages in the Web site.
* Administrator - Has full control of the Web site.
Are there any browser Limitation to use Sharepoint Website?
: No But, Yes. Microsoft recommends using the following browsers for viewing and editing Windows SharePoint Services sites: Microsoft Internet Explorer 5.01 with Service Pack 2, Microsoft Internet Explorer 5.5 with Service Pack 2, Internet Explorer 6, Netscape Navigator
6.2 or
Are there any restrictions or requirements for accessing the Windows SharePoint Services?
No. There are no system or bandwidth limitations for international trial users. Additionally Language packs have been installed which allow users to set up sub-webs in languages other than English. These include: Arabic, Danish, Dutch, Finnish, French, German, Hebrew, Italian,Japanese, Polish, Portuguese (Brazilian), Spanish and Swedish.
Any User outside of organization to participate in my Windows SharePoint Services site
Yes. You can manage this process using the Administration Site Settings. Simply add users via their e-mail alias and assign permissions such as Reader or Contributor.
How do I make my site non-restricted in Sharepoint?
If you want your site to have anonymous access enabled (i.e., you want to treat it like any site on the Internet that does not ask you to provide a user name and password to see the content of the site),
If you want to make your sharepoint website available on Internet and anybody can use it than you can follow below steps:
1) Log-in as an administrator
2) Click on site settings
3) Click on Go to Site Administration
4) Click on Manage anonymous access
5) Choose one of the three conditions on what Anonymous users can access:** Entire Web site** Lists and libraries** Nothing Default condition is nothing; your site has restricted access.
The default conditions allow you to create a secure site for your Web site.
How do the sub sites work in SharePoint?
You can create a sub site for various categories.
For example:* Departments - finance, marketing, IT* Products - electrical, mechanical, hydraulics* Projects - Trey Research, Department of Transportation, FDA* Team - Retention team, BPR team* Clients - new clients, old clients* Suppliers - Supplier 1, Supplier 2, Supplier 3* Customers - Customer A, Customer B, Customer C* Real estate - property A, property BThe URLs for each will be, for example:** can keep track of permissions for each team separately so that access is restricted global access to the parent site.
How to make SharePoint website made available for public?
By default all the website created in SharePoint are private,However If you want your site to be a public Web site, enable anonymous access for the entire site. Then you can give out your URL to anybody in your business card, e-mail or any other marketing material. The URL for your Web site will be http://WebsiteName.wss.bcentral.comHence, please take special care to name your site.These Web sites are ideal for information and knowledge intensive sites and/or sites where you need to have shared Web workspace. Remember: Under each parent Web site, you can create up to 10 sub-sites each with unique permissions, settings and security rights.
Can I create your own custom templates in Sharepont?
Yes you can. You can have templates for business plans, doctor's office, lawyer's office, Educational, health etc and if you want to share with anyone else in SharePint community you can upload your own SharePoint templates to Microsoft website.

Sharepoint interview question and answers

Sharepoint interview question and answers
What Is the use of SPWeb.EnsureUser in sharePoint?
It Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site.
Can multiple SharePoint installs point to the same DataBase?
Multiple SharePoint installs can use the same database server. Not literally the same database on that server. That server must be SQL Server 2000 or SQL Server 2005. It cannot be Oracle or another vendor.
What is a Field Control in SharePoint?
Field controls are simple ASP.NET 2.0 server controls that provide the basic field functionality of SharePoint. They provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.
What are content types in SharePoint?
A content type is a flexible and reusable WSS type definition (or we can a template) that defines the columns and behavior for an item in a list or a document in a document library. For example, you can create a content type for a leave approval document with a unique set of columns, an event handler, and its own document template and attach it with a document library/libraries.
What is the relationship between Microsoft SharePoint Portal Server and Microsoft Windows Services?
Microsoft SharePoint Products and Technologies (including SharePoint Portal Server and Windows SharePoint Services) deliver highly scalable collaboration solutions with flexible deployment and management tools. Windows SharePoint Services provides sites for team collaboration, while Share Point Portal Server connects these sites, people, and business processes-facilitating knowledge sharing and smart organizations. SharePoint Portal Server also extends the capabilities of Windows SharePoint Services by providing organizational and management tools for SharePoint sites, and by enabling teams to publish information to the entire organization.
What does AllowUnsafeUpdates do ?
If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe updates on the Web site, without requiring a security validation. You can do by setting the AllowUnsafeUpdates property. C#: using(SPSite mySite = new SPSite("yourserver")) { using(SPWeb myWeb = mySite.OpenWeb()) { myWeb.AllowUnsafeUpdates = true; SPList interviewList = myWeb.Lists["listtoinsert"]; SPListItem newItem = interviewList.Items.Add(); newItem["interview"] = "interview"; newItem.Update(); } }
Can SharePoint be linked to a SQL database?
This is possible via a custom application, but it not natively supported by SharePoint or SQLServer.
Can SharePoint be linked to an external data source?
SharePoint data can be opened with Access and Excel as an external data source. Thus, SharePoint can be referenced as an external data source. SharePoint itself cannot reference an external datasource.
What types of files can I upload / post to the SharePoint site?
The only files restricted in Sharepoint are those ending with the following extensions: .asa, .asp, .ida, .idc, .idq.Microsoft reserves the right to add additional file types to this listing at any time. Also, no content that violates the terms of service may be uploaded or posted to the site.
Can each user have access to their own calendar in a SharePoint Website?
Yes there are two ways to do this,
* by creating a calendar for each user, or
* by creating a calendar with a view for each user.

SilverLight interview questions and answers 2

SilverLight Faqs 2
What is the difference between WPF and Silverlight?
Silverlight uses a particular implementation of a XAML parser, with that parser being part of the Silverlight core install. In some cases, the parsing behavior differs from the parsing behavior in Windows Presentation Foundation (WPF), which also has a particular implementation
What is Silverlight Tool Kit?
To create an application or game you need to design, code and give some extra feature to your output.
To do the above, you need some controls, IDE etc.
Silverlight Tool kit is nothing but is a collection of Silverlight Tools, Components etc. It includes source code describing the all you need to develop an application.
Can I add more than one .xaml pages in silverlight application?
Yes, you can have multiple .xaml files in a single project.
In the App.xaml, in the method Application_Startup you can choose, which page you want to
initially display.
How does Silverlight 2 differ from Adobe Flash?
As I am from .Net background so in my views you can get C# / compiled code but in Flash there is only action script.
You can find difference in depth at :
What happened when I press F5 within Visual Studio to run Silverlight application?
When you run the Silverlight application within Visual Studio, a new folder created in the web-site project for silverlight solution and it happened only first time. The folder name is ClientBin and having package with XAP extension which contains compiled project.
Can you elaborate how to start a silverlight application with Visual Studio?
You can find a fully described article from
In the following step(s) I am giving the ideas all about:
1.Create a project:Here you just start your visual studio, Select your programming language [C#/VB], Choose Silverligh Template give the name and save it
2. Adding SIlverlight COntrols:One thing is happened here, controls cannot dragged onto the designer, you can draw/drag the controls on XAML page.
(a) Naming to control:In this step just give the name to your silverligt control like for Button you can give name as : btnmySilverligtButton
(b)Adding event handlers to Silverlight controls:Here you can give the event handlers like for click etc.
(c)Testing Silverlight applications in Visual Studio:Now just press F5 and test your application
What is the best place to start Silverlight application?
There is no hard and fast rule to start Silverlight application. Every developer
can start as per his/her experience.
like as per my case I always prefer Visual Studio. SO, in my view Visual Studio is the best place to start with Silverlight2 applications.Microsoft provides
templates for creating Silverlight applications and libraries in C#
and Visual Basic

Silverlight interview questions and answers

Silverlight interview questions and answers
1)What kind of audio video formats are supported in Silverlight?
Silverlight supports Windows Media Audio and Video (WMA, WMV7-9) and VC-1, as well as MP3 audio.

2)How many ways you can display text using Silverlight?

Silverlight supports displaying static pre formatted text that is comprised out of glyph elements and also dynamic text that uses TextBlock. With glyphs, one needs to position the characters individually while TextBlock supports simple layout.
3)How does XAP work in silverlight?
Once you have created the .xap file (explained below), the Silverlight 2 or 3 plug-in downloads the file and runs it in a separate work space.
4)How do I use a .xap file in silverlight?
A .xap file is used to contain and transfer the assemblies and resources of a managed code application. This managed code application must be run within the Silverlight 2 browser plug-in.
5)What are the files contained in the .xap file in Silverlight?
A basic xap file in silverlight will have an assembly related to specific code for the application, an application manifest file and any additional assemblies need to run the application. At a minimum, two files are needed, the application manifest file and the application assembly.
For example:
What is contained in the AppManifest.xaml file in silverlight?
The AppManifest.xaml file contains the deployment details needed to run the silverlight application.
Basic example:
What is the XAP mime type in silverlight?
The .xap mime type is: application/x-silverlight
Which platforms and browsers will Silverlight 2 supports?
Silverlight will support all major browsers on both Mac OS X and on Windows. Particular care is being taken to account for differences in platform and browser capabilities to ensure a consistent experience including experiences on Firefox, Safari, and Internet Explorer. Microsoft will extend the support for Silverlight on Linux through a partnership with Novell.
What is the difference between Silverlight 1 and Silverlight 2
Nothing, Silverlight 2 is a full superset of Silverlight 1.0 - it is 100% compatible with Silverlight 1.0 applications and provides significantly more powerful features and functionality. Silverlight 1.0 applications even benefit from improvements in media playback and performance characteristics of Silverlight 2 with no additional work.
What is Storyboard in Silverlight?
Storyboard is a Silverlight class with controls animations with a timeline, and provides object and property targeting information for its child animations

C interview questions,C interview reference questions

# What does the term cast refer to? Why is it used?
A Casting is a mechanism built into C that allows the programmer to force the conversion of data types. This may be needed because most C functions are very particular about the data types they process. A programmer may wish to override the default way the C compiler promotes data types.
# In arithmetic expressions, to what data type will the C compiler promote a character?

It will promote it to an integer unless otherwise directed.
# What is the difference between a statement and a block?
A statement is a single C expression terminated with a semicolon. A block is a series of statements, the group of which is enclosed in curly-braces.
# Increment the variable next three different ways.
next = next + 1;
next += 1;
# How is a comment formed in C.
Comments in C begin with a slash followed by an asterisk. Any text may then appear including newlines. The comment is finished with an asterisk followed by a slash. Example:
/* This is a comment */
# Can comments be nested?
Not in standard (K&R) C.
# From the standpoint of programming logic, what is the difference between a loop with the test at the top, and a loop where the test is at the bottom?
If the test is at the bottom, the body of the loop will always be executed at least once. When the test is at the top, the body of the loop may never be executed.
# Specify the skeletons of two C loops with the test at the top.
next = 0; /* setup */
while ( next < max) { /* test */ printf("Hello "); /* body */ next++; /* update */ } and for ( next = 0; next < max; next++) /* setup,test */ /* and update */ printf("Hello"); /* body */ # Specify a C loop with the test at the bottom.
next = 0; /* setup */
do { printf("Hello"); /* body */ next++; /* update */ } while ( next < max); /* test */ # What is the switch statement?
It is C's form of multiway-conditional (a.k.a case statement in Pascal).
# What does a break statement do? Which control structures use it?
The break statement unconditionally ends the execution of the smallest enclosing while, do, for or switch statement.
# In a loop, what is the difference between a break and continue statement?
The break terminates the loop. The continue branches immediately to the test portion of the loop.
# Where may variables be defined in C?
Outside a function definition (global scope, from the point of definition downward in the source code). Inside a block before any statements other than variable declarations (local scope with respect to the block).
# What is the difference between a variable definition and a variable declaration?
A definition tells the compiler to set aside storage for the variable. A declaration makes the variable known to parts of the program that may wish to use it. A variable might be defined and declared in the same statement.
# What is the purpose of a function prototype?
A function prototype tells the compiler to expect a given function to be used in a given way. That is, it tells the compiler the nature of the parameters passed to the function (the quantity, type and order) and the nature of the value returned by the function.
# What is type checking?
The process by which the C compiler ensures that functions and operators use data of the appropriate type(s). This form of check helps ensure the semantic correctness of the program.
# To what does the term storage class refer?
This is a part of a variable declaration that tells the compiler how to interpret the variable's symbol. It does not in itself allocate storage, but it usually tells the compiler how the variable should be stored.
# List C's storage classes and what they signify.
static - Variables are defined in a nonvolatile region of memory such that they retain their contents though out the program's execution.
register - Asks the compiler to devote a processor register to this variable in order to speed the program's execution. The compiler may not comply and the variable looses it contents and identity when the function it which it is defined terminates.
extern - Tells the compiler that the variable is defined in another module.
volatile - Tells the compiler that other programs will be modifying this variable in addition to the program being compiled. For example, an I/O device might need write directly into a program or data space. Meanwhile, the program itself may never directly access the memory area in question. In such a case, we would not want the compiler to optimize-out this data area that never seems to be used by the program, yet must exist for the program to function correctly in a larger context.
# State the syntax for the printf() and scanf() functions. State their one crucial difference with respect to their parameters.
Where fmtStr tells printf() how to format the variable list that follows. var1 through varN may be variables of any base type.
scanf( fmtStr, &var1, &var2, &varN);
This routine is the input compliment to printf().
scanf() requires the address of each variable instead of the variable's value (as in printf()). This is subtle source of serious bugs.
# With respect to function parameter passing, what is the difference between call-by-value and call-by-reference? Which method does C use?
In the case of call-by-reference, a pointer reference to a variable is passed into a function instead of the actual value. The function's operations will effect the variable in a global as well as local sense. Call-by-value (C's method of parameter passing), by contrast, passes a copy of the variable's value into the function. Any changes to the variable made by function have only a local effect and do not alter the state of the variable passed into the function.
# What is a structure and a union in C?
A structure is an aggregate data type. It combines one or more base or aggregate data types into a package that may treated as a whole. A structure is like a record in other languages. A union combines two or more data types in the same area of storage. The contents of a union may be one data type at one time and another type at a different time. A union is sometimes called a trick- record.
# Define a structure for a simple name/address record.
struct nameAddr {
char name[30];
char addr[30];
char city[20];
char state[3];
char zip[5];
# What does the typedef keyword do?
This keyword provides a short-hand way to write variable declarations. It is not a true data typing mechanism, rather, it is syntactic "sugar coating."
# Use typedef to make a short-cut way to declare a pointer to the nameAddr structure above. Call it addrPtr.
typedef struct nameAddr *addrPtr;
# Declare a variable with addrPtr called address.
addrPtr address;
# Assuming the variable address above, how would one refer to the city portion of the record within a C expression?
# What is the difference between: #include and #include "stdio.h"
They both specify a file for inclusion into the current source file. The difference is where the file stdio.h is expected to be. In the case of the brackets, the compiler will look in all the default locations. In the case of the quotes, the compiler will only look in the current directory.
# What is #ifdef used for?
It is used for condition compilation. Specifically the source code between #ifdef and #endif (or #else) is compiled if the associated symbol is defined to the compiler.
# How do you define a constant in C?
The C language itself has no provision for constants. However, its companion program, the preprocessor, can be used to make manifest constants. It does this through the use of the #define keyword.
# Why can't you nest structure definitions?
Trick question: You can nest structure definitions.
# Can you nest function definitions?
No. (You can in Pascal, a close relative to C.)
# What is a forward reference?
It is a reference to a variable or function before it is defined to the compiler. The cardinal rule of structured languages is that everything must be defined before it can be used. There are rare occasions where this is not possible. It is possible (and sometimes necessary) to define two functions in terms of each other. One will obey the cardinal rule while the other will need a forward declaration of the former in order to know of the former's existence. Confused?
# What are the following and how do they differ: int, long, float and double?
int An integer, usually +/- 215 in magnitude.
long A larger version of int, usually +/- 231 in magnitude.
float A single precision real (floating point) number. Magnitude varies.
double A double precision real number. Magnitude varies.
# Define a macro called SQR which squares a number.
#define SQR(x) (x * x)
(The parenthesis around "x * x" are extremely important because the macro may be expanded into a place where any embedded spaces could cause the compiler to misinterpret the expression. The consequences could range from a pesky syntax error to wrong answers when the program is run.). Moral: The preprocessor does not know C.
# Is it possible to take the square-root of a number in C. Is there a square-root operator in C?
Yes. There is no square-root operator; such computation is performed though the use of a function.
# Using fprintf() print a single floating point number right-justified in a field of 20 spaces, no leading zeros, and 4 decimal places. The destination should be stderr and the variable is called num.
fprintf( stderr, "%-20.4f", num);
# What is the difference between the & and && operators and the | and || operators?
& and | are bitwise AND and OR operators respectively. They are usually used to manipulate the contents of a variable on the bit level. && and || are logical AND and OR operators respectively. They are usually used in conditionals.
# What is the difference between the -> and . operators?
They both provide access to members of a structure or union. They differ in that -> is used when the variable is a pointer to a structure or union. The dot is used when the variable is itself the structure or union. The -> operator combines the pointer dereferencing operator with the member access operator; it is syntactic "sugar coating."
address->city is equivalent to (*address).city.
# What is the symbol for the modulus operator?
% (the percent symbol)
# From the standpoint of logic, what is the difference between the fragment:
if (next < max) next++; else next = 0; and the fragment: next += (next < max)? (1):(-next); Nothing. They are different ways to express the same logic. # What does the following fragment do?
while((d=c=getch(),d)!=EOF&&(c!='\t'||c!=' '||c!='\b')) *buff++ = ++c;
Do the following until either the end of standard input or the variable c takes on the value of a tab, space, or backspace character: Store the character that succeeds the character stored in c into the current location pointed by buff. Then increment buff to point to the next location in memory. Meanwhile, d is assigned the same value as c and it is the value of d that is used in the comparison to EOF.
# Is C case sensitive (ie: does C differentiate between upper and lower case letters)?
# Specify how a filestream called inFile should be opened for random reading and writing. the file's name is in fileName.
inFile = fopen( fileName, "r+");
# What does fopen() return if successful. If unsuccessful?
Upon success fopen() returns a pointer to a filestream. Otherwise it returns the value of NULL.
# What is the void data type? What is a void pointer?
The void data type is used when no other data type is appropriate. A void pointer is a pointer that may point to any kind of object at all. It is used when a pointer must be specified but its type is unknown.
# Declare a pointer called fnc which points to a function that returns an unsigned long.
unsigned long (*fnc)();

# Declare a pointer called pfnc which points to a function that returns a pointer to a structure of type nameAddr.
struct nameAddr *(*pfnc)();
# It is possible for a function to return a character, an integer, and a floating point number. Is it possible for a function to return a structure? Another function?
No. However, it is possible to return pointers to structures and functions.
# What is the difference between an lvalue and an rvalue?
The lvalue refers to the left-hand side of an assignment expression. It must always evaluate to a memory location. The rvalue represents the right-hand side of an assignment expression; it may have any meaningful combination of variables and constants.
# Given the decimal number 27, how would one express it as a hexadecimal number in C?
# What is malloc()?
This function allocates heap storage for dynamic data structures.
# What is the difference between malloc() and calloc()?
The malloc() function allocates raw memory given a size in bytes. On the other hand, calloc() clears the requested memory to zeros before return a pointer to it. (It can also compute the request size given the size of the base data structure and the number of them desired.)
# What kind of problems was C designed to solve?
C was designed to be a "universal" assembly language. It is used for producing system software such as operation systems, compilers/interpreters, device drivers, editors, DBMS's and similar things. It is not as well suited to application programs.
# write C code for deleting an element from a linked listy traversing a linked list efficient way of elimiating duplicates from an array
# Declare a void pointer
void *ptr;

# Make the pointer aligned to a 4 byte boundary in a efficient manner
assign the pointer to a long number and the number with 11...1100 add 4 to the number

# What is a far pointer (in DOS)

# Write an efficient C code for 'tr' program. 'tr' has two command line arguments. They both are strings of same length. tr reads an input file, replaces each character in the first string with the corresponding character in the second string. eg. 'tr abc xyz' replaces all 'a's by 'x's, 'b's by 'y's and so on.
have an array of length 26.

put 'x' in array element corr to 'a'
put 'y' in array element corr to 'b'
put 'z' in array element corr to 'c'
put 'd' in array element corr to 'd'
put 'e' in array element corr to 'e'
and so on.
the code
while (!eof)
c = getc();
putc(array[c - 'a']);
# Write C code to implement strtok() 'c' library function.
# Implement strstr(), strcpy(), strtok() etc
# Reverse a string.
# Given a linked list which is sorted, how will you insert in sorted way.
# Write a function that allocates memory for a two-dimensional array of given size (parameter x & y)
# Write source code for printHex(int i) in C/C++
# Write a function that finds the last instance of a character in a string.
Top Blogs