GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 12 of 32    Print  
What is the output of the program
void main()
{
struct a
{
int i;
char *st1;
};
typedef struct a ST;
ST *str1;
str1=(ST*)malloc(100);
str1->i=100;
strcpy(str1->st1,"Welcome to Oracle");
printf(" %d%sn",str1->i,str1->st1);
getch();
}

A. core dump
B. will not compile
C. 100,Welcome to Oracle
D. None of these

C




  
Total Answers and Comments: 1 Last Update: August 28, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 28, 2005 17:35:58   #1  
Johon        

RE: What is the output of the programvoid main(){struct a{int i;char *st1;};typedef struct a ST;ST *str1...
A.
The strcpy() will seg fault as there's no allocated memory for the destination string.

 
Is this answer useful? Yes | No

 Related Questions

Void main(){struct a{char ch[10];char *str;};struct a s1={"Hyderabad","Bangalore"};printf("n%c%c",s1.ch[0],*s1.str);printf("n%s%s",s1.ch,s1.str);getch();}
HB, HyderabadBangalore 

Main(int argc,int *argv[]){int i;for(i=1;i
I work for oracle 

Void main(){int i,j,k;for(i=0;i<3;i++)k=sum(i,i);printf("n%d",k);getch();}sum(s,t){static int m;m+=s+t;return m;}

Void main(){int i;clrscr();for(i=1;i<6;++i)switch(i){case 1:case 2: printf("%d,",i++);break;case 3: continue;case 4: printf("%d,",i);}printf("%d",i);getch();}
1; 4; 6 

Which of the storage class(es) becomes the global variables for the entire programA. ExternB. StaticC. AutoD. Register

What is the output of the programvoid main(){char s[]="oracle is the best";char t[40];char *ss,*tt;while(*tt++=*ss++);printf("%s",t);getch();}A. Oracle is the bestB. Core dumpC. Error MessageD. Goes into infinite loop

What is the output of the program?void main(){int j[10]={9,7,5,3,1,2,4,6,9};int i=1;clrscr();for(;i<9;i++)printf("%d ",--j[i++]);getch();}A. 6,2,1,5B. 6,2,1,5,7C. Error MessageD. core dump

What is the output of the programvoid main(){int i,j,k,n=5;clrscr();for(i=5;i>0;i--){j=1

Which of the following storage class(es) became the global variable for the entire programA. ExternB. StaticC. AutoD. Register

What is the output of the program, if integer occupies 2 bytes memory?union{int a;char b;char c[10];}u1;void main(){int l=sizeof(u1);printf("%d",l);getch();}A. 13B. 10C. 16D. None of the above


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Taking Advantage of Standard Internet Protocols

Taking Advantage of Standard Internet Protocols As mentioned Oracle XML DB provides native support for standard internet protocols such as S WebDAV and Continuing with the preceding sample you might for example upload another employee XML document into the XML repository with one of the above prot
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer&rsquo; s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

SQA Lifecycle Standards

SQA Lifecycle Standards Software Quality Assurance procedures have finally been standardized and have been virtually perfected after years of planning on how to perfect the application standardization mosgoogle Through experience the company was able to place in writing how to develop a plan for sof
 

Star Topology

Star Topology Star Topology is the most common type of network topology that is used in homes and offices In the Star Topology there is a central connection point called the hub which is a computer hub or sometimes just a switch In a Star Network the best advantage is when there is a failure in cabl
 

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