Also can we have an analog signal in alternating current?
A sine wave is an analog signal. Alternating current is nothing BUT analog, so I don't even understand how you can ask the question. I think you must have been given some VERY misleading information about what is digital and what is analog.
Thank you for your answer, I was a bit confused that's why I asked this question.
I wasn't sure if my thinking was correct but now I see that I was correct.
At a test I gave the example of an analog signal as a sine wave.
You can have a digital representation of a sine wave as well. I wouldn't have given you credit on an exam answered in that fashion if I was grading. You can have a signal, either analog or digital, that is sinusoidal, but a sine is not descriptive enough to distinguish between an analog and a digital signal.
I was asked to draw a continuous signal and I draw a sine wave, which it is continuous.
Can someone provide me other(better) examples?
Thanks in advance.
You did just fine. There is no need for any "better" example.
A "digital" version of a sine wave would be something like the output from a Digital to Analog Converter (DAC). Do you know what a sine wave output from a DAC would look like, and how it would be different from the analog sine wave that you drew on the test?
Separate names with a comma.