BCA's Programming

This is blog spot created for B.C.A students with a purpose to give help students in their basic ciruculum activites. One stop solution for all your program errors.I would like to share my knowledge for these students with view to make the studying more interesting and interactive.

  • Home
  • Contact Us
  • Privacy Policy
  • Terms and Conditions

Write a ‘C’ Program to accept a string from user and display the alternate characters

By Sachin Shinde February 28, 2017

#include<stdio.h>
#include<conio.h>
void main()
{

 char str[20];
int i=0;
 clrscr();

printf("\n enter the string");
scanf("\n %s",str);
  for(i=0;i<strlen(str);i=i+2)
 {
  
   printf("%c",str[i]);
 }

 getch();
}
/* OUTPUT

 enter the string MAHARASHTRA
MHRSTA */
Email ThisBlogThis!Share to XShare to Facebook

Newer Post Older Post Home

Search

100% FREE Demat Account + Amazon Voucher 1000/- In 10 Minutes | Upstox

100% FREE Demat Account + Amazon Voucher 1000/- In 10 Minutes | Upstox
100% FREE Demat Account + Amazon Voucher 1000/- In 10 Minutes | Upstox

Blog Archive

  • ►  2019 (1)
    • ►  February (1)
  • ▼  2017 (64)
    • ►  March (44)
    • ▼  February (20)
      • Write a C program to accept two strings str1 and s...
      • Write a program to covert temperature from Celsius...
      • Write a program, which accepts a character from th...
      • Write a C program to display multiplication table ...
      • Write a C program for multiplication of two matric...
      • Program to accept Book details of ‘n’ books as boo...
      • program to generate following pattern for n lines:
      • Program to create student structure having fields ...
      • Write a C program to convert a given string into u...
      • Program to generate following pattern for n lines.
      • program to check whether given number is perfect o...
      • Write a ‘C’ Program to find the union and intersec...
      • program to check whether given number is Palindrom...
      • Write a C program to calculate the area of followi...
      • Write a ‘C’ Program to accept a string from user a...
      • program to accept character & display its ASCII va...
      • C++ Program Write a ‘C’ Program to copy the conten...
      • C++ Program Write a ‘C’ Program to read data from ...
      • C++ Program .Write a program to copy contint of on...
      • C++ Program .Write a program to calculate length o...
  • ►  2016 (22)
    • ►  April (12)
    • ►  March (10)
  • ►  2015 (15)
    • ►  December (1)
    • ►  September (13)
    • ►  March (1)
  • ►  2014 (84)
    • ►  September (5)
    • ►  July (2)
    • ►  May (15)
    • ►  March (5)
    • ►  February (11)
    • ►  January (46)
  • ►  2013 (3)
    • ►  November (3)

Popular Posts

  • Create a form to accept employee details like name, address and mobile number. Once the employee information is accepted, then accept LIC information like policy_no, name, premium. Display employee details and LIC details on next form.(use COOKIE)
    Emp.html <html> <body> <form method="POST" action="Lic.php"> Enter EMP No : <input ty...
  • Write a java program to accept n name of cities & Sort them descending order.
    class SortCity {             public static void main(String arg[])             {                         String name[]=new Stri...
  • Write a program, which accepts a number n and displays each digit in words. Example: 6702 Output = Six-Seven-Zero-Two.
    #include<stdio.h> #include<conio.h> main() { int num,rem=0,digit; clrscr(); printf("Enter number="...
  • Program to accept Book details of ‘n’ books as book_title, author, publisher and cost. Assign the accession number to each book in increasing order Display these details as
    Program to accept Book details of ‘n’ books as book_title, author,   publisher and cost. Assign the accession number to each book in incre...
  • Define an interface which has methods area(), volume(). Define constant PI. Create a class cylinder which implements this interface and calculate area and volume. (Use define())
    <?php                         interface Cyl         {                         function area();                         functi...

Categories

  • BCA Sem VI Advance Java Slips Solution
  • Ebooks
  • FYBCA ( Sem–II) Assignment No.2 Decision making and looping.(solved assignment)
  • FYBCA ( Sem–II) Assignment No.3 using function.(solved assignment)
  • FYBCA ( Sem–II) Assignment No.4 Array program.(solved assignment)
  • INFORMATION ABOUT TALLY.ERP 9
  • RDBMS Assignment
  • RDBMS ASSIGNMENT
  • TYBCA (Sem IV) Java Programs
  • TYBCA (Sem VI) Adv Java Programs
  • TYBCA PHP Assignment

Copyright © BCA's Programming
Back to Top