Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Janardhan yadav
C interview questions
2 Answer(s)      3 years and 3 months ago
Posted in : Java Interview Questions


Plz answer the following questions..... TECHNICAL - C

/question number 1/ Code: int z,x=5,y=-10,a=4,b=2; z = x++ - --y * b / a; What number will z in the sample code above contain? a. 5 b. 6 c. 10 d. 11 e. 12


/question number 2/ With every use of a memory allocation function, what function should be used to release allocated memory which is no longer needed?

a. unalloc() b. dropmem() c. dealloc() d. release() e. free()


/question number 3/ Code: void *ptr; myStruct myArray[10]; ptr = myArray; Which of the following is the correct way to increment the variable "ptr"? a. ptr = ptr + sizeof(myStruct); [Ans] b. ++(int*)ptr; c. ptr = ptr + sizeof(myArray); d. increment(ptr); e. ptr = ptr + sizeof(ptr);


/question number 4/ Code: char* myFunc (char *ptr) { ptr += 3; return (ptr); } int main() { char *x, *y; x = "HELLO"; y = myFunc (x); printf ("y = %s \n", y); return 0; } What will print when the sample code above is executed? a. y = HELLO b. y = ELLO c. y = LLO d. y = LO e. x = O


/question number 5/ Code: struct node nPtr, *sPtr; / pointers for a linked list. */ for (nPtr=sPtr; nPtr; nPtr=nPtr->next) {
free(nPtr); } The sample code above releases memory from a linked list. Which of the choices below accurately describes how it will work?

a. It will work correctly since the for loop covers the entire list. b. It may fail since each node "nPtr" is freed before its next address can be accessed. c. In the for loop, the assignment "nPtr=nPtr->next" should be changed to "nPtr=nPtr.next". d. This is invalid syntax for freeing memory. e. The loop will never end.


/question number 6/ What function will read a specified number of elements from a file?

a. fileread() b. getline() c. readfile() d. fread() e. gets()


/question number 7/ "My salary was increased by 15%!" Select the statement which will EXACTLY reproduce the line of text above. a. printf("\"My salary was increased by 15/%!\"\n"); b. printf("My salary was increased by 15%!\n"); c. printf("My salary was increased by 15'%'!\n"); d. printf("\"My salary was increased by 15%%!\"\n"); e. printf("\"My salary was increased by 15'%'!\"\n");


/question number 8/ What is a difference between a declaration and a definition of a variable?

a. Both can occur multiple times, but a declaration must occur first. b. There is no difference between them. c. A definition occurs once, but a declaration may occur many times. d. A declaration occurs once, but a definition may occur many times. e. Both can occur multiple times, but a definition must occur first.


/question number 9/ int testarray[3][2][2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; What value does testarray[2][1][0] in the sample code above contain? a. 3 b. 5 c. 7 d. 9 e. 11


/question number 10/ Code: int a=10,b; b=a++ + ++a; printf("%d,%d,%d,%d",b,a++,a,++a); what will be the output when following code is executed a. 12,10,11,13 b. 22,10,11,13 c. 22,11,11,11 d. 12,11,11,11 e. 22,13,13,13


Advertisement
View Answers

May 30, 2011 at 3:58 PM


1) 5

2) free()

3)

4) y = LO

5) It may fail since each node "nPtr" is freed before its next address can be accessed.

6) fread()

7) printf("\"My salary was increased by 15%%!\"\n");

8) According to C++, Both can occur multiple times, but a declaration must occur first. According to C, A definition occurs once, but a declaration may occur many times.

9) 11

10) 22,13,13,13



May 30, 2011 at 4:00 PM


1) 5

2) free()

3) By providing function by user can increment that pointer.

4) y = LO

5) It may fail since each node "nPtr" is freed before its next address can be accessed.

6) fread()

7) printf("\"My salary was increased by 15%%!\"\n");

8) According to C++, Both can occur multiple times, but a declaration must occur first. According to C, A definition occurs once, but a declaration may occur many times.

9) 11

10) 22,13,14,14



Related Tutorials/Questions & Answers:
C interview questions
C interview questions  Plz answer the following questions..... TECHNICAL - C /question number 1/ Code: int z,x=5,y=-10,a=4,b=2...? a. 5 b. 6 c. 10 d. 11 e. 12 /question number 2/ With every use of a memory
C interview questions
C interview questions  Plz answer the following questions..... TECHNICAL - C /question number 1/ Code: int z,x=5,y=-10,a=4,b=2...? a. 5 b. 6 c. 10 d. 11 e. 12 /question number 2/ With every use of a memory
Advertisements
Difference between C++ and Java - Java Interview Questions
Difference between C++ and Java  Basic difference between C... was derived from C++ but still there is big difference between these two... definition in C++, but there is no closing semicolon. 3. Forward reference
interview questions - Java Interview Questions
interview questions for Java  Hi Any one can u please post the interview point of questions.Warm Regards, Satish
interview - Java Interview Questions
interview  kindly guide me some interview questions of Java
basic c/c++ questions
basic c/c++ questions  Are the Control statements like if(),while() in built functions? if no, why not as they satisfy all the properties of a function
basic c/c++ questions
basic c/c++ questions  Are the Control statements like if(),while() in built functions? if no, why not as they satisfy all the properties of a function
C/C++ QUESTIONS
C/C++ QUESTIONS  â??Write a function for finding out the occurences of repeated word from a sentence. This function would return an array of duplicate words.â
C/C++ QUESTIONS
C/C++ QUESTIONS  "Write a function for finding out highest and lowest marks obtained by a student from an array contained student name and marks". For Example : GetHighestLowestMarks{Student{n}, Marks{n}} returns
Interview Question - Java Interview Questions
Interview Question  I need Interview Questions on Java,J2EE Pls help me
java - Java Interview Questions
Helpful Java Interview questions   Need Helpful Java Interview questions
Hi - Hibernate Interview Questions
Hi   please send me hibernate interview questions
Hibernate - Hibernate Interview Questions
hibernate interview questions and answers  Hi, Can anyone give me the best reference of hibernate interview questions and answers?Thanks in advance
About interview questions
About interview questions   I want interview questions on IDE's Please send links
Java Interview Questions
Java Interview Questions  Hi, Can anyone tell the urls of Java Interview Questions on roseindia.net? Thanks
Struts - Java Interview Questions
Struts Interview Questions  I need Java Struts Interview Questions and examples
java - Servlet Interview Questions
java  servlet interview questions  Hi friend, For Servlet interview Questions visit to : http://www.roseindia.net/interviewquestions/servlet/ Thanks
java interview - JSP-Interview Questions
java interview  what type of questions would be asked to a 3 years experience person in java? can anyone please provide list of topics or interview questions for 3 years experience in java
help me - Java Interview Questions
interview questions java pdf   Do you have any PDF for Java Interview questions
interview questions - EJB
interview questions in Java  Need interview questions in Java ...://www.roseindia.net/ejb/Interview Questions: http://www.roseindia.net.... If you really want to win the interview then follow the steps.Learn core java http
jvm - Java Interview Questions
jvm  Can you provide some JVM Questions for Java Interview preparation
Hibernate interview Questions
, but in that they have currently not updated interview questions. They have explain so many new technology with pictorial example and sample programs but interview question...Hibernate interview Questions  Pl share hibernate interview
java questions - Java Interview Questions
the paths of java core questions and answers pdfs or interview questions pdfs or ebooks :) please favor me best books of interviews questions for craking the interview for any company for <1 year experience thanks for all of u in advance
pls send maven interview questions
pls send maven interview questions  pls send maven interview questions to anvesh2406@gmail.com
interview question - Servlet Interview Questions
interview question  What is Servlet? Need interview questions on Java... and HTTP Servlet.While going through an interview you could be asked for number... according to your experience.And for collection of Java Servlet Interview Question you
interview questions
interview questions   Tell us about a situation where you had to solve a difficult problem. What did you do? What is your typical way of dealing with conflict? Give us an example. Tell us about a problem that youâ??ve solved
interview questions
interview questions   Tell us about a situation where you had to solve a difficult problem. What did you do? What is your typical way of dealing with conflict? Give us an example. Tell us about a problem that youââ?¬â?˘ve solved
interview questions
interview questions   Tell us about a situation where you had to solve a difficult problem. What did you do? What is your typical way of dealing with conflict? Give us an example. Tell us about a problem that youâ??ve solved
interview questions
interview questions   Tell us about a situation where you had to solve a difficult problem. What did you do? What is your typical way of dealing with conflict? Give us an example. Tell us about a problem that youâ??ve solved
hint - Java Interview Questions
of interview questions and their answers. Thanks  thanks for your...hint  Dear roseindia, i want the java interview question and the corresponding question answers.   Hi Friend, Please visit
java - Java Interview Questions
Java Development  I need a Job in Java Development..so preparing for it. Can anyone please guide me how to prepare and what are the common questions that can be asked at interview
Java interview questions
Java interview questions  Plz answer the following questions... - 1 b. -231 to 231 - 1 c. -264 to 264 d. -232 to 232 - 1 Which of the following is not a hexadecimal number? (A) 999 (B) (hex)23 (C) 0x556 (D) 0x1F2
java - Java Interview Questions
java  i want to java&j2ee interview questions. Regards Akhilesh Kumar  Hi friend, I am sending you a link. This link will help you. Read for more information. http://www.roseindia.net/interviewquestions
java - Servlet Interview Questions
Java Design Patterns Interview Questions and Answers  I need to know Java Design Patterns with the help of Interview Questions and Answers  Hi malli,GenericServlet is the super class of HttpServlet calssjava soft
Java - Java Interview Questions
Interview interview, Tech are c++, java,  Hi friend, Now get more information. you can lean all type interview question by following link..., Am Ashok Kumar C from Tamilnadu, I am going to finish Master Degree In Computer
Servlet Interview questions - Servlet Interview Questions
Servlet Interview questions  what is RequestDispatcher in servlets? what is SendRedirectin servlets? give the answers for these two questions with examples?   Hi Friend, A RequestDispatcher object can forward
java - Java Interview Questions
/interviewquestions/ Here you will get lot of interview questions...java  hello sir this is suraj .i wanna ask u regarding interview... simple 2 answer..but it becomes complicated wen v see questions in jumbled form
c++ - IDE Questions
c++  how can i write a simple program in c++ that outputs 399 in words?thank you.  Hi Friend, C program to convert number to words: #include #include char *ch1[]={" "," one"," two"," three"," four"," five
Interview question - Java Interview Questions
Interview question   Hi Friends, Give me details abt synchronization in interview point of view. I mean ow to explain short and neat. Thanks
Interview Tips - Java Interview Questions
Interview Tips  Hi, I am looking for a job in java/j2ee.plz give me interview tips. i mean topics which i should be strong and how to prepare. Looking for a job 3.5yrs experience
Interview question - JSP-Interview Questions
Interview question   Hi Friend, Can we inherit interface in JSP. Thank u in advance
interview question - Java Interview Questions
interview question  hello i want technical interview question in current year   Hi Friend, Please visit the following links: http://www.roseindia.net/interviewquestions/ http://www.roseindia.net
java - Java Interview Questions
Java interview questions and answers for freshers  Please provide me the link of Java interview questions and answers for freshers  Hi friend,class Point{ int x, y; Point(){ System.out.println("default"
Sql Interview questions? - SQL
Sql Interview questions?  Define join?when will use join? define Inner join? give the example? and when will use inner join? define outer join? define left outer join?give the example? and when will use left outer join
Java - Java Interview Questions
Java  Questions on Java
Interview Question - Java Interview Questions
Interview Question  1)If we give S.O.P. statement after finally block shall it prints or not? 2)Write a program in java to read a file & write...(new FileReader("c://a.txt")); Pattern pat = Pattern.compile
Jsp - Java Interview Questions
Need JSP Interview Questions  Hi, I need JSP interview questions.Thanks
Weblogic Portal - JSP-Interview Questions
Weblogic Portal  Hi, Can any please give me the details of 1) Weblogic portal interview questions & answers ? 2) Weblogic portal learning step by step websites? Thanks for your help in advance
PHP MYSQL Interview Questions
PHP MYSQL Interview Questions  What kind of questions can be asked in an PHP, MYSQL interview? Can anyone post the PHP interviews questions with well explained answers?   PHP, MYSQL Interview Questions Please tell me
Advertisements
 

 

 

DMCA.com