Anda di halaman 1dari 57

SearchSearch

Upload
Sign InJoin

Home

Saved

Bestsellers

Books

Audiobooks

Magazines

Documents

Sheet Music

7.2K views
0Up votes, mark as useful
0Down votes, mark as not useful
50 Important Questions of C Language
Uploaded by RahulGupta
this book contains important interview question of c languageFull description
Copyright:© All Rights Reserved
Downloadas DOCX, PDF, TXT or read online from Scribd
Flag For Inappropriate Content
Save
50 Important Questions Of C Language
For Later
Save
Embed
Share
Print
RELATED TITLES
Carousel Next

00 Course Plan

C (programming in c)

Programming Electronic


c important questions.pdf

Byte Order 2a

audioseg-1.2

Se204 Finals

Ejm

C (Programming in c)

Syllabus123@uptu


C progamming Language

Pages From SAMv1-7

10_5 ``Equivalence'' Between Pointers and Arrays

MiniTest_230304

C and Data Structures Unit Wise Important Questions

OCPJP 6 Free Mock Exam Practice Questions

Basics of C

Computer

makefile.pdf

Tricky C Questions

String Buffer

LabVIEW Strings, File IO and Property Nodes

Extending

WINSEM2013-14_CP3057_28-Jan-2014_RM01_demopattern1 (1)

Marble Framework.pptx

01 Module Overview

IPractica_2016II_solucionario

Introduction to Pgm Tool

Java Bytearrayoutputstream

c language


Customer Master sap

Rahu Neelam Sabstitute

Sales Document

aswgandha.txt

Material Master

Sap Sd Practice Detail

aswgandham


LIST of Sap Implemented List

Client Name

Developmental growth theories.pdf

Basic Rules in Sap Sd Module 120723112157 Phpapp02

30 Programmes

Client Name
50
Important
Questions
Of C
Language
1. Write a
program to print
numbers from
1 to 100 without
using loops2.
Write a C
program to swap
two variables
without using a
temporary
variable.3. What
is the 8 queens
prob...lem? Write
a C program to
solve it?4. Write
a C program to
print a square
matrix
helically.5. Write
a C program to
reverse
a string.6. Write
a C program to
reverse the words
in a sentence in
place.7. Write a
C program
generate
permutations.8.
Write a C
program for
calculating the
factorial of a
number.9. Write
a C program to
calculate
pow(x,n)?
10.Write a C
program which
does wildcard
pattern matching
algorithm.11.Ho
w do you
calculate the
maximum sub
array of a list of
numbers?
12.How to
generate
fibonacci
numbers? How
to find out if a
given number is
a
Fibonaccinumber
or not? Write C
programs to
do both.13.Solve
the Rat In A
Maze problem
using
backtracking.14.
What Little-
Endian and Big-
Endian? How
can I determine
whether a
machine’s byte
order is
big-endian or
little endian?
How can we
convert from one
to another?
15.Write C code
to solve the
Tower of Hanoi
problem.16.Write
C code to return
a string from a
function.17.Write
a C program
which produces
its own source
code as its
output.18.Write a
C program to
convert from
decimal t
o any base
(binary, hex, oct
etc…).
19.Write C code
to check if an
integer is a
power of 2 or not
in a single line?
20.Write a C
program to find
the GCD of two
numbers.21.Writ
e code to remove
duplicates in
a sorted array.
22.Find the
maximum of
three integers
using the ternary
operator.23.How
do you initialize
a pointer inside a
function?
24.Write C code
to dynamically
allocate one, two
and three
dimensional
arrays (using
malloc()).25.Ho
w would you
find the size of
structure without
using sizeof()?
26.Write a C
program to
multiply two
matrices.27.Writ
e a C program to
check for
palindromes.28.
Write a C
program to
convert a
decimal number
into a binary
number.29.Write
C code to
implement the
Binary Search
algorithm.30.Wri
te code to
evaluate a
polynomial.31.W
rite code to add
two
polynomials.32.
Write a program
to add two
long positive
numbers (each
represented by
linked lists).33.H
ow do you
compare floating
point numbers?
34.What’s a good
way to
implement
complex
numbers in
C?35.How can I
display a
percentage-done
indication on the
screen?36.Write
a program to
check if a given
year is a leap
year or not?37.Is
there something
we can do in C
but not in C++?
38.How to swap
the two nibbles
in a byte ? How
to generate the
next prime after a
given prime?
39.How to scan a
string till we hit a
new line using
scanf()?40.Write
pseudocode to
compare versions
(like 115.10.1 vs
115.11.5).41.Ho
w do you get the
line numbers in
C?42.Write your
own sqrt()
function in
C.43.Write a
simple piece of
code to split a
string at equal
intervals.44.Is
there a way to
multiply matrices
in lesser than
o(n^3) time
complexity?
45.How do you
find out if a
machine is 32 bit
or 64 bit?
46.Write a
program to have
the output go two
places at once (to
the screen and to
a file
also).47.How can
we sum the digits
of a given
number in single
statement?
48.Given two
strings A and B,
how would you
find out if the
characters in B
were a subset of
thecharacters in
A?49.Write a
program to
merge two arrays
in sorted order,
so that if an
integer is in both
the arrays,it gets
added into the
final array only
once.50.Write
your own trim()
or squeeze()
function to
remove the
spaces from a
string.
Share this document
Share or Embed Document
Sharing Options
 Share On Facebook, Opens A New Window
 Share On Twitter, Opens A New Window
 Share On LinkedIn, Opens A New Window
 Share With Email, Opens Mail Client
 Copy Text

Discover what all the buzz is about.


Pause
Read Free for 30 Days
 "I use Scribd daily and love that it syncs to all of my
devices!"

5 Stars
RockYourCulture
 "I cancelled my Audible subscription for Scribd and I have
ZERO regrets!"

5 Stars
BriLorr1990
 "The selection of books, audiobooks, magazines, articles,
etc is outstanding!"

5 Stars
Ajpett1982
 "Scribd has so many books, I sometimes don’t know where
to start!"
5 Stars
MipphyMoo
 "Scribd offers an absolutely amazing way to discover new
books."

5 Stars
Marhauhs
 "This app has the potential to be revolutionary...Very
beneficial."

5 Stars
LoudenTheGreat
 "It’s every serious reader’s dream app."

5 Stars
ReneaTinyTalks
 "I’m in love with learning and this app is making it all the
better!"

5 Stars
CatrachitaFresca
 "I’m able to learn so much while commuting with this app,
lots of very good titles."

5 Stars
Andrewaggasi
 "It is a great deal because it offers so many audiobook as
well as new books to read."

5 Stars
Met1958
 "I love this app so much! I love being able to have my
hands and eyes free to work."

5 Stars
Cb102311
 "Seriously the best audiobook app! Especially since the
books are unlimited!"

5 Stars
Machella
 "I love this app and subscription, it’s brought back the joy of
reading for me."
5 Stars
LokiRoxx
 "This app lets me feed my book addiction without busting
my wallet."

5 Stars
MippyMoo
 "I use this daily for ebooks and audiobooks to listen to on
my phone in the car."

5 Stars
MsMacAccount
 "This app changed my life. It is the best app I have ever
used. I am really enjoying it."

5 Stars
Shegz007
 "I still can’t believe such a service like this even exists.
Thank you Scribd!"

5 Stars
Sabina
 "This is a great app for book lovers, everything you need
under one app!"

5 Stars
Easyetsy
 "Scribd is a phenomenal compendium of everything. I
would highly recommend it."

5 Stars
Desertsaint88
 "Not only are a plethora of audiobooks available at my
fingertips but also books."

5 Stars
SanDiegoBullfrog
 "The selection is top notch. Price is great. Quality of the
audiobooks is perfect."

5 Stars
DarcyGoe

Related Interests
 C (Programming Language)
 String (Computer Science)
 Areas Of Computer Science
 Computer Programming
 Computing

Documents Similar To 50 Important Questions of C


Language
Carousel Next

00 Course Plan
UPLOADED BY

RaJu SinGh

C (programming in c)
UPLOADED BY

api-3714604

Programming Electronic
UPLOADED BY
Dan Adrian

c important questions.pdf
UPLOADED BY

Pradeep Kumar Reddy Reddy

Byte Order 2a
UPLOADED BY

Nivi Senthil

audioseg-1.2
UPLOADED BY

Paweł Mikołajczyk

Se204 Finals
UPLOADED BY

Erdem Balcı

Ejm
UPLOADED BY

César Augusto

C (Programming in c)
UPLOADED BY

manojindrajith

Syllabus123@uptu
UPLOADED BY
Kamlesh Kumar

C progamming Language
UPLOADED BY

Vinay Felix

Pages From SAMv1-7


UPLOADED BY

antidemos

10_5 ``Equivalence'' Between Pointers and Arrays


UPLOADED BY

gdskumar

MiniTest_230304
UPLOADED BY

Osama Maher

C and Data Structures Unit Wise Important Questions


UPLOADED BY

Toaster97

OCPJP 6 Free Mock Exam Practice Questions


UPLOADED BY

jimmyEj

Basics of C
UPLOADED BY
Nilesh Singh

Computer
UPLOADED BY

arulam

makefile.pdf
UPLOADED BY

daskhago

Tricky C Questions
UPLOADED BY

honalemangesh

String Buffer
UPLOADED BY

Ankit Kanojia

LabVIEW Strings, File IO and Property Nodes


UPLOADED BY

Gabriel Sarmiento

Extending
UPLOADED BY

kidbarroco

WINSEM2013-14_CP3057_28-Jan-2014_RM01_demopattern1 (1)
UPLOADED BY
Shravan Kumar

Marble Framework.pptx
UPLOADED BY

Jeremy Rudd

01 Module Overview
UPLOADED BY

Kin Skye

IPractica_2016II_solucionario
UPLOADED BY

Ingeniería Civil Virtual


Introduction to Pgm Tool


UPLOADED BY

Shivram Saudagar

Java Bytearrayoutputstream
UPLOADED BY

Malu Sakthi

c language
UPLOADED BY

api-206947225

More From RahulGupta


Carousel Next

Customer Master sap
UPLOADED BY

RahulGupta

Rahu Neelam Sabstitute


UPLOADED BY

RahulGupta

Sales Document
UPLOADED BY

RahulGupta

aswgandha.txt
UPLOADED BY
RahulGupta

Material Master
UPLOADED BY

RahulGupta

Sap Sd Practice Detail


UPLOADED BY

RahulGupta

aswgandham
UPLOADED BY

RahulGupta

LIST of Sap Implemented List


UPLOADED BY

RahulGupta

Client Name
UPLOADED BY

RahulGupta

Developmental growth theories.pdf


UPLOADED BY

RahulGupta

Basic Rules in Sap Sd Module 120723112157 Phpapp02


UPLOADED BY
RahulGupta

30 Programmes
UPLOADED BY

RahulGupta

Client Name
UPLOADED BY

RahulGupta

Footer Menu
Back To Top
ABOUT
 About Scribd

 Press

 Our blog

 Join our team!

 Contact Us

 Join today

 Invite Friends
 Gifts

SUPPORT
 Help / FAQ

 Accessibility

 Purchase help

 AdChoices

 Publishers

LEGAL
 Terms

 Privacy

 Copyright

Social Media
o
o
o
o
o

 Copyright © 2018 Scribd Inc.


 Browse Books
 Site Directory
 Site Language:

English

1. * C program to find the GCD and LCM of two integers using Euclids'
algorithm
2. */
3. #include <stdio.h>
4.
5. void main()
6. {
7. int num1, num2, gcd, lcm, remainder, numerator, denominator;
8.
9. printf("Enter two numbers\n");
10. scanf("%d %d", &num1, &num2);
11. if (num1 > num2)
12. {
13. numerator = num1;
14. denominator = num2;
15. }
16. else
17. {
18. numerator = num2;
19. denominator = num1;
20. }
21. remainder = numerator % denominator;
22. while (remainder != 0)
23. {
24. numerator = denominator;
25. denominator = remainder;
26. remainder = numerator % denominator;
27. }
28. gcd = denominator;
29. lcm = num1 * num2 / gcd;
30. printf("GCD of %d and %d = %d\n", num1, num2, gcd);
31. printf("LCM of %d and %d = %d\n", num1, num2, lcm);
32. }
$ cc pgm11.c
$ a.out
Enter two numbers
30
40
GCD of 30 and 40 = 10
LCM of 30 and 40 = 120

Anda mungkin juga menyukai