GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Dharma Systems  >  Technical
Go To First  |  Previous Question  |  Next Question 
 Technical  |  Question 2 of 14    Print  
Give the output of the program
void main()
{
int i;
for(i=1;i<4,i++)
switch(i)
case 1: printf("%d",i);break;
{
case 2:printf("%d",i);break;
case 3:printf("%d",i);break;
}
switch(i) case 4:printf("%d",i);
}

1,2,3,4




  
Total Answers and Comments: 0 Last Update: N/A   
  
 Sponsored Links

 

No answers are posted for this question yet.
Be the first to answer it!


 Related Questions

Undefined 

Give the output of the programvoid main(){int i;for(i=1;i<4,i++)switch(i)case 1: printf("%d",i);break;{case 2:printf("%d",i);break;case 3:printf("%d",i);break;}switch(i) case 4:printf("%d",i);}
1,2,3,4 

Give the output of the programvoid main(){char *s="12345sn";printf("%d",sizeof(s));}

Give the output of the programvoid main(){unsigned i=1; /* unsigned char k= -1 => k=255; */signed j=-1; /* char k= -1 => k=65535 *//* unsigned or signed int k= -1 =>k=65535 */if(ij)printf("greater");elseif(i==j)printf("equal");}
less 

  D 

How do you declare an array of N pointers to functions returningpointers to functions returning pointers to characters?A. char *(*(*a[N])())();B. Build the declaration up incrementally, using typedefs:C. Use the cdecl program, which turns English into C and viceversa:D. All of the above.

The number of syntax errors in the program?int f()void main(){f(1);f(1,2);f(1,2,3);}f(int i,int j,int k){printf("%d %d %d",i,j,k);}
None. 

56QUESTION 11#define one 0#ifdef oneprintf("one is defined ");#ifndef oneprintf("one is not defined "); 

Void main(){int count=10,*temp,sum=0;temp=&count;*temp=20;temp=&sum;*temp=count;printf("%d %d %d ",count,*temp,sum);}
20; 20; 20; 

321 


 Sponsored Links

 
Related Articles

ERP Systems as Quality Control Support

ERP Systems as Quality Control Support For the past few years ERP systems have became one of the most powerful tools for quality control management But ERP is just an informatics system that provides support to the integrated business management mosgoogle center Goals of the Quality Control Module i
 

C++ Void Pointer and Null Pointer

C Void Pointer and Null Pointer In this C tutorial you will learn about two interesting types of pointers; void pointers and Null Pointer These pointers will be discussed in conjunction with syntax usage and example mosgoogle center Pointer to Void General Syntax void pointer variable; Void is use
 

C++ Standard Input Output Stream

C Standard Input Output Stream In this C tutorial you will learn about standard input stream and standard output stream explained along with syntax and examples C programming language uses the concept of streams to perform input and output operations using the keyboard and to display information on
 

Evolution of database systems

The Evolution of Database systems File Management System Hierarchical database System&nbsp; Network Database System&nbsp; Relational Database System File Management System: The file management system also called as FMS in short is one in which all data is stored on a singl
 

printf() Function Return Value

What is the return value from printf() function? printf function always returns the number of characters printed. Let us understand this with an example: main() { int a=10; printf(&quot;%d&quot;,printf(&quot;%d %d %d&quot;, a,a,a)); } In this above program the inner printf i
 

How is the main() function declared?

The declaration of main can be done as int main() One more declaration that can be taken by main is command line arguments form int main(int argc, char *argv[]) or this can also be written as int main(argc, argv) int argc; char *argv[]; NOTE: It is not possible for one to declare the main
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(&ldquo;%d&rdquo;,x); z= sample() } sample() { printf(&ldquo;Testing program&rdquo;); } Output is &nbsp;&nbsp;&n
 

How to develop compile and run a C program

The steps involved in building a C program are: 1. First program is created by using any text editor and the file is stored with extension as .c 2. Next the program is compiled. There are many compilers available&nbsp;like GNU C compiler called as gcc, Sun compiler, Borland compiler which is pop
 

What are the Format Specifiers used with printf?

There are several format specifiers available in printf. The format specifier used varies depending on the data type used for printing. The given below are some of the format specifiers used with printf in C program. For integer data type the format specifier used with printf is %d or %i For float
 

What are the limitations with switch statement?

Switch statement is a powerful statement used to handle many alternatives and provides good presentation for C program. But there are some limitations with switch statement which are given below: Logical operators cannot be used with switch statement. For instance case k&gt;=20: is not allowe
 

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