ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
how to find out the biggest element (or any other 
operation) in an array which is dynamic. User need not to 
mention the array size while executing.
 Question Submitted By :: Prakashdasari
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to find out the biggest element (or any other operation) in an array which is dynamic. User need not to mention the array size while executing.
Answer
# 1
soory i dont no but i need this Answer
 
Is This Answer Correct ?    0 Yes 2 No
Rahul
 
  Re: how to find out the biggest element (or any other operation) in an array which is dynamic. User need not to mention the array size while executing.
Answer
# 2
it is said that while executing also the user should not specify the size means it can be done in another method without using ARRAYS......... using only one variable.. since it is asked to find only the biggest element , this program suits.....

#include<stdio.h>
#include<conio.h>
void main()
{
int n,BIG;
printf("enter the numbers :");
scanf("%d",&n);
BIG=n;
do
{
fflush(stdin);
scanf("%d",&n);
if(n>=BIG)
BIG=n;
}while(((char)n>=65)&&((char)<=122));
printf("the biggest number is : %d",BIG);
getch();
}


thank u
 
Is This Answer Correct ?    0 Yes 1 No
Vignesh1988i
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
explain memory layout of a C program  1
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to? CTS2
wats the diference btwen constant pointer and pointer to a constant.pls give examples.  6
write a addition of two no. program with out using printf,scanf,puts .  3
to find out the reverse digit of a given number Infosys5
tell me the full form of c?  2
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; } NDS3
write a code for large nos multilication (upto 200 digits) Persistent1
helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.  3
consider the following program sigment int n,sum=1; switch(n) { case 2:sum=sum+2; case 3:sum*=2; break; default:sum=0;} if n=2, what is the value of sum a.0 b.6 c.3 d.none TCS4
why java is called as a purely oops language.  2
Determine if a number is a power of 2 at O(1).  1
Predict the output or error(s) for the following: 25. main() { printf("%p",main); } ME3
write a c program to accept a given integer value and print its value in words  3
what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);} TCS8
#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } Find the output CitiGroup4
HOW DO YOU HANDLE EXCEPTIONS IN C? AppLabs2
Why doesn't the code "a[i] = i++;" work?  4
find a number whether it is even or odd without using any control structures and relational operators? Microsoft14
52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?  6
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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