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   SiteMap shows list of All Categories in this site.
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
Read  N characters in to an array . Use functions to do all
problems and pass the address of array to function.

1.   Print only the alphabets . If in upper case print in 
lower case vice versa.
 Question Submitted By :: Nithya
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa.
Answer
# 1
#include<stdio.h>
#include<conio.h>
void fun(char *);
void main()
{
char a[50];
printf("enter the characters :");
gets(a);
fun(&a);
getch();
}
void fun(char *a)
{
char c;
for(int i=0;a[i]!='\0';i++)
{
if(a[i]>=97&&a[i]<=122)
{
c=a[i]-32;
printf("%c",c);
}
else if(a[i]>=65&&a[i]<=90)
{
c=a[i]+32;
printf("%c",c);
}
else if(a[i]==' ')
countine;
}
}
 
Is This Answer Correct ?    2 Yes 0 No
Vignesh1988i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }  5
what is Structural oriented language? give some example of this language.....?  1
what is disadvantage of pointer in C Tech-Mahindra5
What ios diff. Between %e & %f? Honeywell1
what is difference between overriding and overloading?  1
Who is invented by c? Infosys14
how can i get this by using for loop? * ** * **** * ****** Excel3
CopyBits(x,p,n,y) copy n LSBs from y to x starting LSB at 'p'th position. Adobe4
write a c program to print a given number as odd or even without using loop statements,(no if ,while etc)  4
what is the difference between structural,object based,object orientd programming languages? PanTerra1
What are .h files and what should I put in them?  3
#define d 10+10 main() { printf("%d",d*d); }  3
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
How to use c/c++ code in JAVA Satyam7
How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST Adobe2
What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value Accenture3
can we access one file to one directory?  1
f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output? Hughes6
what is the difference between arrays and linked list Tech-Mahindra15
which types of data structure will i use to convert infix to post fix??? IIT3
 
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