GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Motorola  >  Technical
Go To First  |  Previous Question  |  
 Technical  |  Question 2 of 2    Print  
C Test Questions

1. main()
{
int arr[100];
int c:
int N;
for(i=-:i<N;i++)
 arr[i]=i;
 minvalue i = .....
 Maxvalue i = .....

Ans 0,100 resp


2. for n=2 the following fn returning value is
int fun(int n)
{
for(i = 1;i<=n;i++)
for(j=i;j<=i;j++)
sum=sum+j;
return(sum);
}

Ans 6


4. Calculate sum=1+1+2+1+2+3+1......
 Ans i<=x;j<=i
5. for x=2 y=3 z=1
the following fn return
int fun(int n; int y; int z)
{
int sum
for(i=x;i<=y;i++)
for(j=1;j<=z;z++)
sum=sum+z;
return sum
}
Ans 0(check)


6. The values of sum from above fn
for x=0; y=0;z=1 Ans 1
7.how can you insert the following values in stack and numbers
0,20,30,40,50.60
stack [][][][][][]
numb [][][][][][][]
Ans
60 50 40 30 20 10
10 20 30 40 50 60
check.


8. # if ndif XYZ
#include "XYZ.h"
#endif
what is meaning ?
Ans:
if XYZ is not defined then only include the header file XYZ.h.


9. p:malloc(int*sizeof(int));
ans: a


10.a=5 b=10 c=7
(a>c)?a:((b>c)?b:c)

ans 10

11. debugging eliminates Ans[c]
ans: both logical & ruin time errors.

12. int term (int x)
{ int sum=0;int i;
for(i=0;i<=5;i++)
sum+=x; /*problel is wrong but Ans is 650.*/
return(sum);
} Ans 650
the above fn value for x=150


13.int x;
scanf("%d",x);
 what is error in the above program


14.int a[] = { 1, , 9,2.......}
int *p;
p=&a[2];
printf("%s",p);
a)7 b)2 c)4407 d)none
ans: d


15.a[][] = {1,2},{3,4}
b[] [] ={
void fun(A,B)
int i,j;
for(i=1;i<N;i++)
for(j=1;j<N;j++)
sum=sum+A[i][j];
return sum;
}
what is wrong in the above function?


16. OTHER QUESTIONS ARE MAINLY CONCENTRATED ON ERRORS LIKE
(i)syntax (ii) runtime (iii) logical (iv) debugging.


17. A binary tree with depth of '3' has max kof 20 nodes ans: no.


18.. malloc ? 2. char * p =" hwllo world " , what is wrong?

19. char *(*(*a(N))())();?

20. *p++ = ?

21  int i=7
      printf( "%d n",i++ i++) o/p =? ans 56

22. n=2 pow((2.0,n),++n)?

23. #define macro for ( i,g) ?

24. int reg=2 is there any wrong ? write a reason

25. #define max 10
p=&(a+b);
q=*max;
} what is wrong

26. strcat( string,'O');
wrong? werite reason?

27.char *s=char * ....
else (string)....? wrong? write reason?




  
Total Answers and Comments: 2 Last Update: January 27, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 09, 2005 19:55:58   #1  
Bharadwaj        

RE: C Test Questions

Friends who ever has given this information hats off and thankyou so much providing suach an impoprtant and wonderful information.Hope to see u with flying colours in future.

Thanks and Regards

Bharadwaj


 
Is this answer useful? Yes | No
January 27, 2006 01:56:54   #2  
shrey        

RE: C Test Questions

Is this for placement in motorola india ?

is this for entry level or any other position ?


 
Is this answer useful? Yes | No

 Related Questions

Q. write a C code     1.to reverse a string using a recursive function, without     swapping or using an extra memory.    2.To reverse a linked list as above.Q. 
Latest Answer : strtok - extracts tokens from stringschar *strtok(char *str, const char *delim);The  strtok()  function  parses a string into a sequence of tokens.  On       the first call to strtok() the string to be ...

1. main(){int arr[100];int c:int N;for(i=-:i 
Latest Answer : Is this for placement in motorola india ?is this for entry level or any other position ? ...


 Sponsored Links

 
Related Articles

jQuery Three-color Alternating Pattern

Learning jQuery Three color Alternating Pattern There may be times when we want to apply more complex striping For example we can apply a pattern of three alternating row colors rather than just two To do so we first need to define another CSS rule for the third row We ll also reuse the odd and even
 

Data Warehouses Non Technical Issues

Data Warehouses Non Technical Issues When companies get ready to implement a data warehouse few of them pay attention to the political issues that may surround it It must be emphasized that politics can reduce the chances for success with a data warehouse project and I want to warn companies against
 

Importance of Strong Vocabulary

Why Having a Strong Vocabulary is So Important In addition to your appearance and the way you carry yourself people will judge you based on the words that come out of your mouth Even if you are a mathematical genius having a poor vocabulary will send across a message that you re not very intelligent
 

Technical Aspects of CRM

Technical Aspects of CRM While it must be emphasized that CRM is not a technology there are a number of technical issues that need to be considered when a company decides to implement a CRM system The first technical issue that needs to be analyzed is scalability In a nutshell the CRM system must be
 

HR Interview - Most Popular HR Interview Questions With Generic Answer Formats

Most Popular HR Interview Questions With Generic Answer Formats While it is impossible to know exactly what you will be asked during a job interview there are a number of generic questions that most companies will ask you mosgoogle In this article I will present you with some questions that are comm
 

HR Interview - How To Deal With Tricky Interview Questions

How To Deal With Tricky Interview Questions During your HR interview you will be presented with a number of questions from the interviewer The way you answer these questions will play a role in whether or not you re hired While some of these questions have obvious answers others will be tricky and t
 

How Leaders Can Build A Strong Team

How Leaders Can Build A Strong Team To be a great leader you will want to build a powerful team It doesn t matter how successful you are or plan to be To succeed you must know how to assemble the best people This is important whether you are a coach general or corporate executive mosgoogle The team
 

Questions You Should Be Prepared For During A Job Interview

Questions You Should Be Prepared For During A Job Interview While the way you answer questions during a job interview will only play a small role in whether or not you are hired it is important to pay attention to them Going to a job interview can be stressful especially if it is a highly competitiv
 

ASP.NET Technical Practice Test

ASP NET Technical Practice Test This article provides details about ASP NET Technical Online Practice Test which is made available at geekinterview com Questions are generated randomly each time you take the test Online Practice Test is made available to everyone you too can take the test and get yo
 

C# Technical Practice Test

C Technical Practice Test This article provides details about C Online Practice Test which is made available at geekinterview com Questions are generated randomly each time you take the test Online Practice Test is made available to everyone you too can take the test and get your score assessed mosg
 

Related Categories
Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape